10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
I have tried the following to no avail.
xargs -n8 < test.txt
awk '{if(NR%6!=0){p=""}else{p="\n"};printf $0" "p}' Mod_Alm_log.txt > test.txt
I have tried different variations of the above, the problem is mixes lines together.
And it includes the tags "%a and %A" I need them to be all tab... (16 Replies)
Discussion started by: mytouchsr
16 Replies
3. Shell Programming and Scripting
I have hundreds of files to process. In each file
I need to look for a pattern then
extract value(s) from next line and then
search for value(s) selected from point (2) in the same file at a specific position.
HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V
TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
4. UNIX for Dummies Questions & Answers
Dear all,
Greetings.
I would like to ask for your help to extract lines with specific words in addition 2 lines before and after these lines by using awk or sed.
For example, the input file is:
1 ak1 abc1.0
1 ak2 abc1.0
1 ak3 abc1.0
1 ak4 abc1.0
1 ak5 abc1.1
1 ak6 abc1.1
1 ak7... (7 Replies)
Discussion started by: Amanda Low
7 Replies
5. Shell Programming and Scripting
I am trying to extract multiple strings from snmp-mib files like below.
-----
$ cat IF-MIB.mib
<snip>
linkDown NOTIFICATION-TYPE
OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
STATUS current
DESCRIPTION
"A linkDown trap signifies that the SNMP entity, acting in... (5 Replies)
Discussion started by: genzo
5 Replies
6. Shell Programming and Scripting
This is my problem, my file (file A) contains the following information:
Now, I would like to create a file (file B) containing only the lines with 10 or more characters but less than 20 with their corresponding ID:
Then, I need to compare the entries and determine their frequency. Thus, I... (7 Replies)
Discussion started by: Xterra
7 Replies
7. Shell Programming and Scripting
Hello Friends,
I have got, this output below and i want to extract the name of symlink which is highlighted in red and the path above it highlighted in blue. At the end i want to append path and symlink.
/var/tmp/asirohi/jdk/jre
/var/tmp/asirohi/jdk/jre/.systemPrefs... (3 Replies)
Discussion started by: asirohi
3 Replies
8. Shell Programming and Scripting
Hi.
I have a text test1.txt file like:Receipt
Line1
Line2
Line3
End
Receipt
Line4
Line5
Line6
Canceled
Receipt
Line7
Line8
Line9
End (9 Replies)
Discussion started by: TQ3
9 Replies
9. Shell Programming and Scripting
Hi,
My data looks like this.
CHR SNP BP A1 TEST NMISS OR STAT P
0 SNP_A-8282315 0 2 ADD 1530 1.074 0.7707 0.4409
0 SNP_A-8282315 0 2... (11 Replies)
Discussion started by: genehunter
11 Replies
10. Shell Programming and Scripting
Hi,
I have a text file with 15 columns and i want to extract those lines of which 7th column is ABCD.
I think we can do this using awk but could not frame the command. Please help.
TIA
Prvn (2 Replies)
Discussion started by: prvnrk
2 Replies