10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to split a tab-delimeted file using awk after the second _ in bold. The awk below is close but splits on the first _, and I am not sure how to use the second _. Thank you :).
file
chr1 92145889 92149424 NM_001195684_exon_0_10_chr1_92145900_r 0 -
chr1 92161218 ... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hi
I have a file like this
user="joe"
phone="4280919"
duration=128
login=12/02/2016
ip-address=10.230.120.35
user="mary"
phone="6352728"
duration=23
login=16/02/2016
ip-address=10.123.231.54
I have to convert these to as follows (csv format) (Ignore Login field)... (6 Replies)
Discussion started by: Balav
6 Replies
3. Shell Programming and Scripting
Hi All,
Would appreciate your help as to why the following code not showing the correct output. the issue is on the last else cause. I am trying to report on disk space based on percentage usage. for some reason, it's showing output as OK even thou disk space is 90% !!!! any ideas why? thanks!!... (2 Replies)
Discussion started by: xcod3r
2 Replies
4. Shell Programming and Scripting
Hello Everyone,
I am new to awk and trying my hand with the diff codes and came across the below code today. It would be great if any of the Guru's help me to understand.
awk '{filename = "sample_file" int((NR-1)/34) ".DAT"; print >> filename}' sample_file.DAT
34 is the no of lines each... (7 Replies)
Discussion started by: saratha14
7 Replies
5. Shell Programming and Scripting
Hello Friends,
I would appreciate so much if you could explain how the underscores works at the following code? Sorry if it sounds a bit novice question.
awk -F',' 'NR==FNR{_=1;next}!_{print}' exclude infile
KR,
Eagle (6 Replies)
Discussion started by: EAGL€
6 Replies
6. Shell Programming and Scripting
I must design a UNIX script to monitor files whose size is over a threshold of 5 MB in a specific UNIX directory
I meet a problem during the for loop in my script. Some file names contain spaces.
ls -lrt | awk '$5>=5000000 && length($8)==5 {gsub(/ /,"_",$9); print};'
-rw-r--r-- 1 was61 ... (2 Replies)
Discussion started by: Scofield38
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have a question about the usage of FS in awk and i appreciate if you can help me sort out what i'm doing wrong.
I have a file with info ; separated and i just want to print the o/p of all fields ($1 -> $8) to the screen. As you can see it is very simple but i'm facing an error.
... (5 Replies)
Discussion started by: Dendany83
5 Replies
8. Shell Programming and Scripting
Hi everybody, i know this question is common on the forum and i've searched for my answer but haven't quite found it.
I'm trying to extract some values from a number of log files which look like this:
Peak Power Consumption: 0.20777 Watts
Observed Average Power: 0.1414794247 Watts
The... (9 Replies)
Discussion started by: aKiiY
9 Replies
9. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
10. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies