10 More Discussions You Might Find Interesting
1. Solaris
Hello,
This is Solaris 10 (x86)
bash-3.2# cat /etc/release
Solaris 10 5/09 s10x_u7wos_08 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 30 March... (5 Replies)
Discussion started by: solaris_1977
5 Replies
2. Shell Programming and Scripting
Hi Folks,
I have one requirement, There is one file, which contains two fields.
Based on first field, I need to print an output.
Example will be more suitable.
Input file like this.
abc 5
abc 10
xyz 6
xyz 9
xyz 10
mnp 10
mnp 12
mnp 6 (2 Replies)
Discussion started by: Raza Ali
2 Replies
3. Shell Programming and Scripting
The awk below is close but I can't seem to fix it to produce the desired output. Thank you :).
current awk with output
awk '{c1++; c2+=($2)}
END{for (e in c1) print e, c1, c2}' input
EFCAB5 2 50
USH2A 2 19
desired... (8 Replies)
Discussion started by: cmccabe
8 Replies
4. UNIX for Dummies Questions & Answers
In awk, how do I print all fields with a specified output field separator?
I have tried the following, which does not print the output FS:
echo a b c d | awk 'BEGIN{OFS = ";"}{print $0}' (3 Replies)
Discussion started by: locoroco
3 Replies
5. Shell Programming and Scripting
Legends,
I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output.
can you please help to resolve this.
subtraction is (4th col of f1 - 4th col of f2). but it gives only below lines out of 116. I want to print all... (7 Replies)
Discussion started by: sdosanjh
7 Replies
6. Shell Programming and Scripting
Dear All,
1.txt (tab in between each value in a line)
a b c
a b c
a c d
you can see below, why with ~ i can output with tab, but = cannot?
# awk -F'\t' '$2 ~ /b/' 1
a b c
a b c
# awk -F'\t' '$2 = "b"' 1
a b c
a b c
a b d
... (1 Reply)
Discussion started by: jimmy_y
1 Replies
7. Shell Programming and Scripting
I have file which contains gene lines something like this
Transcript Name GO
POPTR_0016s06290.1 98654
POPTR_2158s00200.1 11324
POPTR_0004s22390.1 12897
POPTR_0001s11490.1
POPTR_0016s13950.1 14532
POPTR_0015s05840.1 13455
POPTR_0013s06470.1 12344... (6 Replies)
Discussion started by: shen
6 Replies
8. Shell Programming and Scripting
Wondering if anybody can help with changing the output of a field. I'm needing to change the output of a field in this file:
User Process ID Time Active Licences Type
ChangeAdmin (Phys-agsdev/19353 212), start Wed 1/21 6:30 (linger: 1800)
u414013 (Phys-agsdev/19353 1491), start Wed 1/21 12:54... (5 Replies)
Discussion started by: Glyn_Mo
5 Replies
9. Shell Programming and Scripting
Im using awk and I want the output filename to contain the first field of the input file.
Ex.
1 dddd wwwww
1 eeeee wwww
1 wwww eerrrr
2 eeee eeeeee
I want the output files to be xxx1 and xxx2
Thank you (4 Replies)
Discussion started by: yahyaaa
4 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I'm trying to truncate a number like the following:
0001060407013900501048239559900600504083525826350002050354795057
I would like to create an output which puts carriage returns every so many characters, giving an output such as:
0001
060407
0139
0
05
010482395599
0060... (4 Replies)
Discussion started by: michaeltravisuk
4 Replies