I need to print command in variable. I know how to do it:
a=$(uname -r)
echo $a
But if I have more commands in script and I need to print only kernel, how can I do it?
./script.sh -k
--------
kernel=5.13.0-28-generic
And also what if I want to print only 'help' ? Thanks!