10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I've a requirement like, in a csv file of 30+ fields where all the columns are having double quotes I need to remove the double quotes from certain fields and certain field should remain as it is.
Eg:... (6 Replies)
Discussion started by: Krishnanth S
2. UNIX for Dummies Questions & Answers
I would like to remove all characters starting with "%" and ending with ")" in the 4th field - please help!!
1412007819.864 /device/services/heartbeatxx 204 0.547%!i(int=0) 0.434 0.112
1412007819.866 /device/services/heartbeatxx 204 0.547%!i(int=1) 0.423 0.123... (10 Replies)
Discussion started by: snemuk14
3. Shell Programming and Scripting
I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes.
Is there a search for that? I tried cut but couldn't get it to work.
Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Discussion started by: Drenhead
4. Shell Programming and Scripting
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
5. Shell Programming and Scripting
I have a input of the form:
..., word1, word2, word3...
I want out put of the form
word1, word2, word3
I tried echo '..., word1, word2, word3...' | tr -d '...,'
but that takes out the commas in the middle too so I get
word1 word2 word3
but I want the commas in the middle.
... (3 Replies)
Discussion started by: forumbaba
6. Shell Programming and Scripting
i have a text file like this:
1 AB AC AD EE
2 WE TR YT WW
3 AS UY RF YT
the file is bigger , but that's an example of the data
what i want to do is to merge all columns together except the first one,
it will become like this :
3 ASUYRFYT (8 Replies)
Discussion started by: shelladdict
7. Shell Programming and Scripting
I have a requirement to remove certain spaces from a table of information, but I'm unsure where to start.
A typical table will be like this:
ABCDE 1 Elton John 25 12 15 9 3
ABCDE 2 Oasis 29 13 4 6 9
ABCDE 3 The Rolling Stones 55 19 3 8 6The goal is to remove only the spaces between... (11 Replies)
Discussion started by: danhodges99
8. Shell Programming and Scripting
I have data extracted like this:
A=%123% B=%456% C=%789%
A=%111% B=%222% C=%333%
A=%777% B=%888% C=%999%
Can someone please help me with a script to remove all the % signs and get the totals for A, B and C.
So output will be:
Thank you! (2 Replies)
Discussion started by: tatchel
9. UNIX for Advanced & Expert Users
I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields.
Thanks (3 Replies)
Discussion started by: rudoraj
10. UNIX for Dummies Questions & Answers
If I have a data test.txt with 1000 columns such as:
id sex gene1 gene2 gene2.dl gene3 gene4 gene4.dl .......
1 1 AA AT AT TT AT AT .......
2 1 AG TT TT TA AA AA .......
3 2 AA AT AT TT AT ... (2 Replies)
Discussion started by: AMBER