10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents
Using the attached file
and using this code.
awk '{print substr($0,4,2)}' input.txt | sort -k1n | awk '{a++}END{for(i in a) print i,a}' | sort -k1 > output
i got the this output.
00 739
01 807
02 840
03 735
04 782
05 850
06 754
07 295
08 388
09 670
10 669
11 762 (8 Replies)
Discussion started by: jiam912
8 Replies
2. Shell Programming and Scripting
Hi,
So I am trying to print the first row(header) first column alongwith the matched value. But I am not sure how do I print the same, by matching a pattern located in the file
eg
File contents
Name Place
Jim NY
Jill NJ
Cathy CA
Sam TX
Daniel FL
And what I want is... (2 Replies)
Discussion started by: sidnow
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a tab-delimited file as follows:
1 1 2 2 3 3 4 4
a a b b c c d d
5 5 6 6 7 7 8 8
e e f f g g h h
9 9 10 10 11 11 12 12
i i j j k k l l
13 13 14 14 15 15 16 16
m m n n o o p p
The output I need is:
1 1 a a 5 5 e e 9 9 i i 13... (5 Replies)
Discussion started by: mvaishnav
5 Replies
4. Shell Programming and Scripting
Hi All
I am having pipe seperated inputs like
Adam|PeteR|Josh|PEter
Nick|Rave|Simon|Paul
Steve|smith|PETER|Josh
Andrew|Daniel|StAlin|peter
Rick|PETer|ADam|RAVE
i want to repleace all the occurrence of peter (in any case pattern PeteR,PEter,PETER,peter,PETer) with Peter so that output... (5 Replies)
Discussion started by: sudeep.id
5 Replies
5. UNIX for Dummies Questions & Answers
i ask to do ,,program that convert the last row to be the first row ,,,and after that exchange the the columns
ex,,
1 2 3
4 5 6
7 8 9
to be
7 8 9
4 5 6
1 2 3
and then to be
9 8 7
6 5 4
3 2 1 (0 Replies)
Discussion started by: khaled1989kh
0 Replies
6. Shell Programming and Scripting
i ask to do ,,program that convert the last row to be the first row ,,,and after that exchange the the columns
ex,,
1 2 3
4 5 6
7 8 9
to be
7 8 9
4 5 6
1 2 3
and then to be
9 8 7
6 5 4
3 2 1
give mee the code .... (0 Replies)
Discussion started by: khaled1989kh
0 Replies
7. Shell Programming and Scripting
Hi
I need to write a small script to kill the process id of particular job in one shot ,
Example
> ps
PID TTY TIME COMMAND
16280 pts/70 0:00 sh
16278 pts/70 0:00 rlogind
16197 pts/70 0:00 ps
1234 pts/70 0:00 runflow
2341 pts/70 0:00 runflow
12673 pts/70 ... (6 Replies)
Discussion started by: mani_isha
6 Replies
8. Shell Programming and Scripting
Hi,
When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part.
For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a file like this.
1,1,1,0,0,0
1,1,2,1,0,0
1,1,3,0,0,0
1,1,4,0,0,0
...........
...........
1,1,24,0,0,0
1,1,25,0,0,0
1,1,26,1,0,0
1,1,27,0,0,0
1,2,1,0,0,0
1,2,2,0,0,0
1,2,3,0,0,0
1,2,4,0,0,0
1,2,5,1,0,0
1,2,6,1,0,0 (4 Replies)
Discussion started by: vskr72
4 Replies
10. UNIX for Dummies Questions & Answers
how can i display every column in a row individually........
i vauguely remmeber something like echo $1 $2 etc.......but i dont remmeber properly......so is there anything like that?
i tried searching but wasnt able to find......
thanks and regards
vivek.s (2 Replies)
Discussion started by: vivekshankar
2 Replies