10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: wtolentino
6 Replies
2. Shell Programming and Scripting
I would like to search for regex in the exif data of a large collection of files (mostly jpg, some nef). For instance "grep_exif Tokyo *.jpg" should return the file names of all files which have "Tokyo" in their exif data.
Exiftool could be used to extract the data. I don't really need to grep... (6 Replies)
Discussion started by: bamse
6 Replies
3. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies
5. Shell Programming and Scripting
Hi,
My log file is something like this.
(08/04/2009 00:27:42.179)(:) aaaaaaaaaaaa
(08/04/2009 00:27:42.181)(:) bbbbbbbbbbbbbbbb
(08/04/2009 01:00:42.713)(:) cd cdc d ddddsksjdkssksksj
(08/04/2009 01:02:42.716)(:) raarrarararararara
(08/04/2009 01:07:43.036)(:ERROR) Port... (8 Replies)
Discussion started by: rdhanek
8 Replies
6. Shell Programming and Scripting
I am wondering if there is a way via grep and sed to extract a string that is on the 2nd line below a known marker as in this example:
TextRel 203 0 0 "WELL:"
SetPosAbs 1287 -6676
TextRel 210 0 0 "AEP #2"
The marker is WELL:, but the string I need is "AEP #2". Can grep/sed handle this... (19 Replies)
Discussion started by: phudgens
19 Replies
7. Shell Programming and Scripting
helo all
i have 2 files. and i want to grep the contents of first file from the 2nd file. but these files are too large contaning lacks of lines .
i'm using for loop but it takes so moch times . is there any other sol.
i'm using this code
"
for var in `cat succ_migrated`
do
grep $var... (4 Replies)
Discussion started by: dodasajan
4 Replies
8. Shell Programming and Scripting
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)
Discussion started by: hariza
4 Replies
9. Shell Programming and Scripting
Hi,
I have a file which computes fields number and some column produced "nan"
I would like to convert the "nan" value to 0 basically.
q=`echo $i $j |awk '{printf("%f",($2/($1+$2)))}'
The above is the command which I use for computation. However, I would
like to check if $1 and $2 is 0, it... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
10. Shell Programming and Scripting
Hello
Pls help me i need script for counting number of fails from file .
The file contains number of failuer records . (2 Replies)
Discussion started by: getdpg
2 Replies