10-05-2009
cat > abc.txt
15:11:53 up 3 days, 23:44, 1 user, load average: 0.00, 0.00, 0.00
15:12:10 up 21:24, 1 user, load average: 0.00, 0.00, 0.00
15:12:04 up 1 day, 10 min, 0 users, load average: 0.00, 0.00, 0.00[/html]
cat abc.txt | perl -e 'while (<>){ chomp; my @cols = split(":");($l1,$l2,$l3) = split(/,/,$cols[-1]); print "$l1\t$l2\t$l3\n";}'
0.00 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Use the variables which are needed ie l1 or l2 or l3 according to your need
Hope this helps .
Cheers
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Discussion started by: ropers
2 Replies
2. Shell Programming and Scripting
Hi all,
I have one more query related to AWK. I have the following csv data:
,qwertyA, field1, field2, field3, field4, field5, field6
,,,,,,,,,,,,,,,,,,,100,200
,,,,,,,,,,,,,,,,,,,300,400
,qwertyB, field1, field2, field3, field4, field5, field6
,,,,,,,,,,,,,,,,,,,100,200... (9 Replies)
Discussion started by: not4google
9 Replies
3. Shell Programming and Scripting
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies
4. Shell Programming and Scripting
Hi Experts,
Help needed on joining one line above & below to the pattern matched string line.
The input file, required output is mentioned below
Input file
ABCD DEFG5 42.0.1-63.38.31
KKKK iokl IP Connection Available
ABCD DEFG5 42.0.1-63.38.31
... (7 Replies)
Discussion started by: krao
7 Replies
5. Shell Programming and Scripting
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Discussion started by: paroikoi
3 Replies
6. Shell Programming and Scripting
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
5 Replies
7. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
8. Shell Programming and Scripting
hello everyone,
im new here, and also programming with awk, sed and grep commands on linux.
In my text i have many lines with this config:
1 1 4 3 1 1 2 5
2 2 1 1 1 3 1 2
1 3 1 1 1 2 2 2
5 2 4 1
3 2 1 1 4 1 2 1
1 1 3 2 1 1 5 4
1 3 1 1... (3 Replies)
Discussion started by: satir
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
If I have a file of something like
@hg19_gold_AL122127.6-131160
GCTTCATCATGCATGGATAGGCTGGCGCCTTTCCTGAGGCCATATGCCGATGGATATG
@hg19_gold_AL122127.6-131159
CTTTAATATTTCCGCCACCATCCTGAGTGAATCCCAGCAAGGACAGTCTTTGGGGATT
@hg19_gold_AL122127.6-131158... (4 Replies)
Discussion started by: jyu429
4 Replies
10. Shell Programming and Scripting
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies
TLOAD(1) Linux User's Manual TLOAD(1)
NAME
tload - graphic representation of system load average
SYNOPSIS
tload [-V] [-s scale] [ -d delay ] [tty]
DESCRIPTION
tload prints a graph of the current system load average to the specified tty (or the tty of the tload process if none is specified).
Options
The -s scale option allows a vertical scale to be specified for the display (in characters between graph ticks); thus, a smaller value rep-
resents a larger scale, and vice versa.
The -d delay sets the delay between graph updates in seconds.
FILES
/proc/loadavg load average information
SEE ALSO
ps(1), top(1), uptime(1), w(1)
BUGS
The -d delay option sets the time argument for an alarm(2); if -d 0 is specified, the alarm is set to 0, which will never send the SIGALRM
and update the display.
AUTHORS
Branko Lankester, David Engel <david@ods.com>, and Michael K. Johnson <johnsonm@redhat.com>.
Please send bug reports to <albert@users.sf.net>
Cohesive Systems 20 Mar 1993 TLOAD(1)