lets say when I execute command and then grep it for a specific output.
for example: man cat|grep "Written"
This gives the name of the authors.
My problem is I want to do this via read.
here is an example of my script:
#!/bin/bash
read variable #lets say input is: man cat|grep "Written"
$variable
It does not seem to work. I need this to work as I am doing a larger script and this part got me stuck. Any tips are appreciated.