10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
2. Shell Programming and Scripting
In the below awk the output is space delimited, but it should be tab delimited. Did I not add the correct -F and OFS? Thank you :).
The input file are rather large so I did not include them, but they are tab-delimeted files as well.
awk
awk -F'\t' -v OFS='\t' 'FNR==1 { next }
> ... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Solaris
Hi all,
In my SunOS 5.10, the command awk using BEGIN option doesn't print output variables like expected
here is my test:
with the following code everything is alright
ps -eo pcpu,args | grep "httpd" | awk ' { print $1 } '
the result is
0.1
However, with this command
ps -eo... (3 Replies)
Discussion started by: Elmassimo
3 Replies
4. Shell Programming and Scripting
Hi Team(Solaris 5.8/Ksh),
How can we save grep output to awk variable when grep returns more than one line or word.
abc.log
# more abc.log
Hi Makarand
How r u
bye Makarand
Hello
when grep returns only 1 word below command works
nawk -v var=`cat abc.log |grep "Hello"` 'BEGIN { if... (6 Replies)
Discussion started by: Makarand Dodmis
6 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to find out number of cores present for hp-ux server from the output of print_manifest (as shown below). i suppose awk will be best tool to use for filtering.
output of print_manifest is :
System Hardware
Model: ia64 hp Integrity Virtual Partition
... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies
6. 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
7. Shell Programming and Scripting
hi Friends ,
I have a file as below
s.txt
1~2~~4
2~6~~7
3~8~~9
t.txt
1~2~~4
2~5~8~7
3~8~~7
header for both files is common (2 Replies)
Discussion started by: i150371485
2 Replies
8. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
9. Emergency UNIX and Linux Support
i have a file which gets appended with 9 records daily and the file keeps growing from then...i use to store the previous day files count in a variable called oldfilecount and current files count as newfilecount.my requirement is that i need to start processing only the new records from the... (3 Replies)
Discussion started by: ganesh_248
3 Replies
10. Shell Programming and Scripting
Hi -
I have a file with contents as below.
12.1 a.txt
12.1 b.txt
12.1 c.txt
13.2 a.txt
13.2 d.txt
14.3 f.txt
15.4 a.txt
15.4 b.txt
15.4 z.txt
I need to print the contents like this.
12.1 a.txt
< >< >< >b.txt
< >< >< >c.txt (7 Replies)
Discussion started by: guruparan18
7 Replies