10 More Discussions You Might Find Interesting
1. AIX
This question is asked in an interview today that I have to return output with each PID number and the count of each PID number logged today. Here is the script that I have written. Can you confirm if that would work or not. The interviewer didn't said if my answer is correct or not. Can someone... (5 Replies)
Discussion started by: Subodh Kumar
5 Replies
2. Shell Programming and Scripting
I am tiring to cont numbers of line between the "!" in CISCO routers
I have no problem to extract the input and change the empty line with !
!
5 Cable5/0/1 U0 4
5 Cable5/0/1 U1 4
!
5 Cable5/0/1 U2 4 ... (4 Replies)
Discussion started by: sharong
4 Replies
3. Shell Programming and Scripting
Data file example
I look for primary and * to isolate the interesting slot number.
slot=`sed '/^primary$/,/\*/!d' filename | tail -1 | sed s'/*//' | awk '{print $1" "$2}'`
Now I want to get the Touch line for only the associate slot number, in this case, because the asterisk... (2 Replies)
Discussion started by: popeye
2 Replies
4. Shell Programming and Scripting
Hello,
I have a file with two columns like the following
FILE1:
chr1 61042
chr1 61153
chr1 61446
chr1 61457
chr1 61621
chr10 61646
chr10 61914
chr10 62024
chr10 62782
Alos, I have another file
FILE2: (13 Replies)
Discussion started by: rkk
13 Replies
5. UNIX for Dummies Questions & Answers
Hi
Please can you help how do I count the number of specific characters or words that appear in a file? (8 Replies)
Discussion started by: fretagi
8 Replies
6. Shell Programming and Scripting
KSH
HP-SOL-Lin
Cannot use xAWK
I have several strings that are quite long and i want to break them down into smaller substrings.
What I have
String = "word1 word2 word3 word4 .....wordx"
What I want
String1="word1 word2"
String2="word 3 word4"
String3="word4 word5"
Stringx="wordx... (5 Replies)
Discussion started by: nitrobass24
5 Replies
7. Shell Programming and Scripting
I have a script that goes through a 24 hr logfile, And i want to count the instances of a Test01 to 83 and output the sum of all the instances over 24hrs
#/bin/ksh
cat $parse_data | awk '/'$time$i'/ {for(x=0; x<=16; x++) {getline; print}print "--" }' > _hr.txt
for... (2 Replies)
Discussion started by: k00061804
2 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have input file with queue names
No.esprd.Queue|No.esdev.Queue|||n|120|No_User||No_User|
No.esdev.Queue|No.esdev.Queue|||n|120|No_User||No_User|
I have to check if the input file contains word "esprd" and the number of times it occurs. I will have to do further... (22 Replies)
Discussion started by: Green_Star
22 Replies
9. Shell Programming and Scripting
Hi!
I have a file that looks like this:
AAG
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGA
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGG
... (2 Replies)
Discussion started by: vanesa1230
2 Replies
10. UNIX for Dummies Questions & Answers
What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
Discussion started by: kthatch
6 Replies