I am trying to make a.sh file that when clicked it runs the script inside. I am trying to recursively find a certain string value inside the contents of the files from a given folder, using $ grep -r "word" /home/folder_name
but I don't know how to do so without running the script in terminal.
Any ideas for this?
Linux shell scripts can be written very basically.To make a shell script, start the script with #!/bin/sh
and add normal linux commands. That is a simple explanation, but it is sufficient for most simple scenarios.
Example:
#,/bin/sh echo "Hello, World!`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.