10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All ,
I am having an input file as stated below
Input file
6 ddk/djhdj/djhdj/Q 10 0.5
dhd/jdjd.djd.nd/QB 01 0.5
hdhd/jd/jd/jdj/Q 10 0.5
512 hd/hdh/gdh/Q 01 0.5
jdjd/jd/ud/j/QB 10 0.5
HD/jsj/djd/Q 01 0.5
71 hdh/jjd/dj/jd/Q 10 0.5
... (5 Replies)
Discussion started by: kshitij
5 Replies
2. Shell Programming and Scripting
I need to remove specific column to one range
source file
3 1 000123456
2 2 000123569
3 3 000123564
12 000123156
15 000125648
128 000125648
Output required
3 000123456
2 000123569
3 000123564
12 000123156
15 000125648
128 000125648 (6 Replies)
Discussion started by: ranjancom2000
6 Replies
3. Shell Programming and Scripting
cat input.txt
a x
b y
c z
Expected output
x
y
z (11 Replies)
Discussion started by: cola
11 Replies
4. Shell Programming and Scripting
input
"A","B","C,D","E","F"
"S","T","U,V","W","X"
"AA","BB","CC,DD","EEEE","FFF"
required output:
"A","B","C,D","C,D","F"
"S", T","U,V","U,V","X"
"AA","BB","CC,DD","CC,DD","FFF"
tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies
5. Shell Programming and Scripting
I found that the following works to remove the first column in my file when my CSV is delimited with a simple comma:
sed -i 's/*,//' file.csv
However, I have a new file where the fields are encapsulated with double quotes - general example of file:
"Internal ID", "External ID", "Name"... (8 Replies)
Discussion started by: lojkyelo
8 Replies
6. Shell Programming and Scripting
Hi,
I would like to ask your expertise to remove specific column no. 8 in the below file using but I don't have an idea on how to simply do this using awk command. Appreciate your help in advance.
Input f:
ABC 1 1XC
CDA 1 2YC
CCC 1 3XC
AVD 1 3XA
Expected output file:
ABC 1 1C
CDA... (9 Replies)
Discussion started by: zzavilz
9 Replies
7. Shell Programming and Scripting
Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately.
Here's some example output:
Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop
bond0 9 83830... (3 Replies)
Discussion started by: ryran
3 Replies
8. Shell Programming and Scripting
FILE A:
9780743551526,(Abridged)
9780743551779,(Unabridged)
9780743582469,(Abridged)
9780743582483,(Unabridged)
9780743563468,(Abridged)
9780743563475,(Unabridged)
FILE B:
c3saCandyland 9780743518321 "CANDYLAND" "MCBAIN, ED" 2001
c3sbCandyland 9780743518321 ... (7 Replies)
Discussion started by: glev2005
7 Replies
9. Shell Programming and Scripting
Folks:
I have a file which has 3 columns. Using awk I want to remove rows from column 3 (Col3 <> A) where it is not equal to A. All columns are seperated by "|".
Col1|Col2|Col3|Col4
1 | 2 | A | 4
2 | 3 | A | 5
3 | 4 | B | 6
4 | 5 | A | 7
5 | 6 | ... (3 Replies)
Discussion started by: pr2003
3 Replies
10. Shell Programming and Scripting
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies