9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to check my data quality. I want to output the lines with non-number. I used the grep command:
grep '' myfile.csv
Since my file is csv file, I don't want to output the lines with comma. And I also don't want to output "." or space. But I still get the lines like the following:... (8 Replies)
Discussion started by: twotwo
8 Replies
2. Shell Programming and Scripting
Hi,
here are few lines present in the logs. I want to grep on Error and print few lines before and after Error word is found
line1
Line2
Line3
Error
Line4
Line5
Line6
Line7
I want the output to be
Line2
Line3
Error
Line5 (1 Reply)
Discussion started by: arghadeep adity
1 Replies
3. Shell Programming and Scripting
Hi,
I wanted to grep string "ERROR" and "WORNING" after last occurrence of String "Starting" only and wanted to display two lines after searched ERROR and WORNING string and one line before. I have following cronjob log file "errorlog" file and I have written the code for same in Unix as below... (17 Replies)
Discussion started by: nes
17 Replies
4. Shell Programming and Scripting
Hi Experts,
- Getting error while using it through a variable to get the PID,
PID=42
# UNIX95=1 ps -e -o pcpu,pid,ppid,stime,etime,args | awk '{if ($2~"^42$") print $0}'
0.00 42 0 Feb 10 600-17:21:29 nfs_async_io
- But when using with a variable it is not working .
#... (6 Replies)
Discussion started by: rveri
6 Replies
5. Shell Programming and Scripting
Symmetrix ID : 00000001234
Host Name : myown
Identifiers Found : 5000000000000000
5000000000000001
Device Cap(MB) Attr Dir:P
------ ------- ---- ----
1234 25886 (M) 8D:1, 9D:1
0123 25886 (M) 8D:1, 9D:1
1345 25886 (M) ... (5 Replies)
Discussion started by: maddy.san
5 Replies
6. UNIX for Dummies Questions & Answers
Hi
I have this txt file getting from a lpstat command.
XA40 XA40 0 Unknown 0 0 1 1 1
0 Unknown LPD 0 0 1 1 2
0 Unknown specified 0 0 1 1 3
XA99 @spip READY
: (FATAL ERROR) 0781-233 Unknown host spiprs01.mon.local.
XA01 @xs00 READY
XA01 XA01 0 Unknown 0 0 1 1 1
0 Unknown LPD 0 0 1 1... (5 Replies)
Discussion started by: npatao71
5 Replies
7. Shell Programming and Scripting
I am running a grep query for searching a pattern, and the output is quite huge. I want only the last 200 lines to be displayed, and I am not sure if tail will do the trick (can tail read from std in/out instead of files?).
Please help me out. (1 Reply)
Discussion started by: shell_newbie
1 Replies
8. Shell Programming and Scripting
Hi I have the following Input
--
-- TABLE: BUSINESS_UNIT
--
ALTER TABLE RATINGS.BUSINESS_UNIT ADD CONSTRAINT FK1_BUSINESS_UNIT
FOREIGN KEY (PEOPLESOFT_CHART_FIELD_VALUE_ID)
REFERENCES RATINGS.PEOPLESOFT_CHART_FIELD_VALUE(PEOPLESOFT_CHART_FIELD_VALUE_ID)
;
ALTER TABLE... (1 Reply)
Discussion started by: pukars4u
1 Replies
9. Shell Programming and Scripting
Hi,
I have a query on using grep options. I tried with several options but unable to do it.
lanite:52> cat note
123 456 ab 123
ab cv 234 4566 67
ab gh tij ab 12 34 ab
ab cv dfgv ab cv ab kjhk ab ghj
sdf
dfg ab jljklj ab
Now, I need to use grep to find the line which contains the... (6 Replies)
Discussion started by: dilipr25
6 Replies