Hi I need to run following bash command in python:
function get_setting () {
echo $(cat /proc/cmdline |
awk -F"$1=" '{print $2}' | awk -F" " '{ print $1 }' )
}
I tried this:
process = subprocess.Popen(["cat", "/proc/cmdline | awk -F"$1=" '{print $2}' | awk -F" " '{ print $1 }", "BOOT_IMAGE"], stdout=subprocess.PIPE)
but it doesn't work.
I don't want to load bash script and run it by python. How do I do that? Any help would be greatly appreciated. thanks