10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
Hi Experts,
I have a Text file generated as below;
<NAME>
NEW#<technicalName><TAB> <Version>
OLD#<technicalName><TAB> <Version>
e.g.
CH_PPV_AUDIT_DISTRIBUTOR
NEW#EL_CFG_FTP_DISTRIBUTOR 2.1.0.upc2
OLD#EL_CFG_FTP_DISTRIBUTOR 2.1.0.upc1... (19 Replies)
Discussion started by: rajangupta2387
19 Replies
4. 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
5. 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
6. Shell Programming and Scripting
I have to change the 4th feild of a line; Most of the time, the line has only 4 feilds, but sometimes, it has more than 4 feilds.
I am using the below command:
NEW_LINE=`echo $Line | awk '{sub ($4, "2010\\\/04\\\/07"); printf "# %-7s %9s %18s\n", $2,$3,$4}'`
This works fine but if the... (7 Replies)
Discussion started by: sugan
7 Replies
7. 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
8. Shell Programming and Scripting
Hi! I need help with this:
I want to write an AWK script, that matches computer usage of users, listed at the available log file, Users.log.
Which is how many times a user has entered, and how much time was logged in?
for example:
$ cat Users.log
user1; login, 2009-03-26, 10:30 ... (1 Reply)
Discussion started by: Ferenc87
1 Replies
9. Shell Programming and Scripting
Hi what is the purpose of using underscore in awk. I suppose it is for defining macro's and reducing repeatation but can some one show me an example? (6 Replies)
Discussion started by: ahmedwaseem2000
6 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