The key word is "string" as opposed to pattern. Fgrep, or grep -F doesn't do any regular expression matching. Consider searching for the string .*.* in a file:
See the difference? Using -F allows the search criteria to be free of any escape characters.
Also, if you are searching for strings, rather than patterns, I believe that using the -F option might result in quicker searches because there isn't any regular expression work involved with the scanning of each input record (I reserve the right to be wrong on that assumption).
Hello everyone, I am using centos,
1) solaris is free right?
2) I want to learn solaris and install it in a computer that I am mounting, I would like know what is strong in solaris and if do it is wise. I am programmer python, learning machine and programming in general,..any help thanks,.. (6 Replies)
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Hello.
I consider myself a journeyman Unix user. I can handle most day to day tasks and have created some fairly complicated command queries, but this problem has defeated me so far. Any help would be greatly appreciated!
We keep an archive in the file system with a directory structure in... (5 Replies)
I am trying to learn how to use the predefined var. I did read perlvar - perldoc.perl.org but like much of the perl docs, I just dont "see" the explanation.
Can someone explain its usage to me. Id like to buffer printing on occasion.
Thanks in advance. (1 Reply)
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)