Skip to content

mcsaucy/kparams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kparams

Extracts kernel parameter values from /proc/cmdline. Handles bare and quoted parameters.

See kernel.org's docs on kernel parameters for more information. While the docs mention using double-quotes to protect values with spaces, we also recognize single-quotes and certain escape sequences to support things like quoted="\"value\"".

Check out tests/*.txt to see examples of what we can extract.

Usage

$ kparams PARAM_NAME [DEFAULT_VALUE]

Requirements

  • A POSIX-compliant shell, or ZSH

About

Extract values from /proc/cmdline with just a shell

Resources

License

Stars

Watchers

Forks