10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
For example:
I have:
HostA,XYZ
HostB,XYZ
HostC,ABC
I would like the output to be:
HostA,HostB: XYZ
HostC:ABC
How can I achieve this?
So far what I though of is: (1 Reply)
Discussion started by: alvinoo
1 Replies
2. Shell Programming and Scripting
(7 Replies)
Discussion started by: newbie2010
7 Replies
3. Shell Programming and Scripting
I have a requirement to replace "\" with "/" in only the 2nd field of the input file which has 2 fields. The field delimiter is "|"
Sample records from input file:
1\23|\tmp\user
mn\wer|\home\temp
Expected output:
1\23|/tmp/user
mn\wer|/home/temp
I used
sed 's/\\/\//g'
... (2 Replies)
Discussion started by: krishmaths
2 Replies
4. Shell Programming and Scripting
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (1 Reply)
Discussion started by: amurib
1 Replies
5. Shell Programming and Scripting
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (0 Replies)
Discussion started by: amurib
0 Replies
6. Shell Programming and Scripting
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla
abc ||| 3 ||| ble
def ||| 1 ||| abc
def ||| 0.2 ||| def
As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Discussion started by: FrancoisCN
1 Replies
7. Shell Programming and Scripting
I want to find the top N entries for a certain field based on the values of another field.
For example if N=3, we want the 3 best values for each entry:
Entry1 ||| 100
Entry1 ||| 95
Entry1 ||| 30
Entry1 ||| 80
Entry1 ||| 50
Entry2 ||| 40
Entry2 ||| 20
Entry2 ||| 10
Entry2 ||| 50... (1 Reply)
Discussion started by: FrancoisCN
1 Replies
8. Shell Programming and Scripting
I want to find duplicates in file on 2nd field i wrote this code:
nawk '{a++} END{for i in a {if (a>1) print}}' temp
Could not find whats wrong with this.
Appreciate help (5 Replies)
Discussion started by: pinnacle
5 Replies
9. Shell Programming and Scripting
Hi,
I have a file with this format:
name number
-------------- -----------
AAA 11700
BBB 6000
CCC 6000
I want to catch any of these names if number > 200
How to do that?
at a... (4 Replies)
Discussion started by: melanie_pfefer
4 Replies
10. Shell Programming and Scripting
Hi
I am a beginner to sed command, here I have a question about using sed to add a few characters into a token of a string.
For example, I have a file,
sqw:qqq:123124:uiqe
dfd:ccc:12390:dfjis
cde:aaa:21311:dfjsid
and, I want the output to be,
sqw:qqq:123124:uiqe... (4 Replies)
Discussion started by: Julius
4 Replies