This Post shows how to execute command in .sh files ie shell script files
Example:
cmd=$(ps -ef | grep tcpdump | awk '{print $3}')
echo $cmd
in .sh files need to use like this variable=$(command)
Example:
cmd=$(ps -ef | grep tcpdump | awk '{print $3}')
echo $cmd
in .sh files need to use like this variable=$(command)
0 comments:
Post a Comment