- The problem statement, all variables and given/known data:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
- Relevant commands, code, scripts, algorithms:
I can read the string from standard input and also print on screen the file's names which contain the string, but only if use the name of the file as parameter. I can't search the string among all the regular files in my directory and i have no idea on how to filter files basing on permissions.
- The attempts at a solution (include all code and scripts):
#!/bin/ksh
echo "Write a string"
read
echo "Files which contain the string are:"
find . -type f | grep -l $REPLY stringhe.rtf
stringhe.rtf is a text file with some random strings created by me.
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Universit� degli Studi di Trieste, Trieste, Italy, Vidimari, IN108
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).