User Profile
Collapse
-
My apologies if I don't understand the question, but in regards to grep returning zero upon sucess :... -
The problem is that these are two different languages. A c file by itself does not execute. It must first be compiled into a binary executable, which is then able to run. The .c file is the source code file & is human readable. The binary executable file that is created by the compiler is not human readable. A .sh file on the other hand is a script, & is executable by the shell (one given the correct file permission). It is an interpreted...Leave a comment:
-
If the application is installed in a global location accessible by the user, the program 'which' will return the binaries location....Leave a comment:
-
You can use grep to check if the word is in the file. What I would do is split each paragraph into it's own file, & then find only the files you wish to keep.
This quick script will point out any line that does not start with a letter. Feel free to edit it as need be.
Code:#/bin/sh file=test.txt keep=`cat ${file} | grep -inv "^[a-z]"` for line in ${keep} do
Leave a comment:
No activity results to display
Show More
Leave a comment: