10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Everyone!
I have updated the first post so that my intentions are easier to understand, and also attached sample files (post #18).
I have over 500 text files in a directory. Over 1 GB of data. The data in those files is organised in lines:
My intention is to return one line per... (23 Replies)
Discussion started by: clippertm
23 Replies
2. Shell Programming and Scripting
14:15:00-
abcdefghijkl.
14:30:00-
abcdefghijkl.
14:35:00-
abcdefghijkl.
123456789.
123456789.
14:45:00-
abcdefghijkl.
14:50:00-
abcdefghijkl.
123456789.
15:30:00-abcdefghijkl. (3 Replies)
Discussion started by: dev_shivv
3 Replies
3. UNIX for Dummies Questions & Answers
Hello , this is my first topic cause I need your little help:(
I got .txt file, and I want to find lines without letter 'a', so im writing:
grep "" list.txt (list.txt is the file of course)
and i have no idea why it's not working because it shows lines with a. (1 Reply)
Discussion started by: bbqtoss
1 Replies
4. Shell Programming and Scripting
I have ASCII files to parse that 48 hours old or more ; I can identify them like so
find . -name "FILE*TXT" -mtime +1 -exec ls -ltas '{}' ';'
Some files have a list of hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to... (3 Replies)
Discussion started by: alan
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
in a script I will do :
grep ORA- mylogfile.log
If it returns any ORA- (oracle error) I whant to have :
echo "subject : RMAN in Error " >> /appli/rap.txt
But if no error
echo "subject : RMAN OK " >> /appli/rap.txt
Can you help me ?
The grep return code would it be... (1 Reply)
Discussion started by: big123456
1 Replies
6. UNIX for Dummies Questions & Answers
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Discussion started by: dashing201
11 Replies
7. Shell Programming and Scripting
Hi,
I have a lot of log files which contain lines in the format of (date info) or (info), and when I use grep to search for "date" I was able to get the (date info) line, but some info lines are a separate line after the (date info) line... for example like:
(date info info info)
(date... (8 Replies)
Discussion started by: a27wang
8 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies
9. Shell Programming and Scripting
Hi guys,
I currently use the below mwntioned grep statemen to get the timestamp of the last generated file in the directory.
(ls -ltr eCustomerCME* | grep ^- | tail -1 | awk ' { print $6,$7,$8 } ')
I need to modify this grep to search for files generated only within last 2 hrs. Can you pls... (5 Replies)
Discussion started by: ragha81
5 Replies
10. UNIX for Dummies Questions & Answers
Hey guys,
I just want to grep for a line then return a few lines above it I can't seem to find what im looking for on google can someone help me out?
This is on Solaris 9.....
I don't have GNU grep so -B and -A commands will not work (3 Replies)
Discussion started by: kingdbag
3 Replies