Sometimes I need to exec a single command which is in a shell script.
I already know sed -n 'line_num p'
can print that line. But how can I exec that printed out specific line as a command?
bashcommand line
Sometimes I need to exec a single command which is in a shell script.
I already know sed -n 'line_num p'
can print that line. But how can I exec that printed out specific line as a command?
Best Answer
Try this:
or, if the command does not contain whitespace,