I have some users in one unix system and i want to search some files with specific to user and then i want to find some content inside that file so can u help me how we can implement it?
File location is as below.
/pools/home_unix/cmadireddy/work/models/model/
cmadireddy is user name.
now under above path i want to open one file makefile and want to search one string from that file.
hope you ppl r geting wt i want to tell.
There are predefined path and predefined files under that path.
I want to search some string inside that file and if found then proper msg should be displayed.
and i want to do this process based on user and followed by string based files is same for all the user.
Second things i want to implement it based on switch case or let me know if any other option is fine or not?
There are only two files makefile and makefile.scpd and i need to search predefined string say rms, ams etc inside that files.
Thanks prashant
---------- Post updated at 08:39 AM ---------- Previous update was at 08:11 AM ----------
the below code will take model no and search under that model no a specific word.
echo "Enter model no for searching string inside makefile"
read inputs2 #find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \;
#;;
I am getting below error.
./menu1.sh: line 151: syntax error near unexpected token `"Hit <ENTER> to continue:"'
./menu1.sh: line 151: `echo "Hit <ENTER> to continue:"'