09-06-2011
awk '{print $1, $2}' myfile.txt
should be able to read the first two fields without boogers. increment the $3,$4 to step through the fields.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.
a) What does this below character means?
b) How can i remove it,
I already have sed '/^$/d'
c) Will this effect the file by any means... (4 Replies)
Discussion started by: tostay2003
4 Replies
2. Shell Programming and Scripting
I have a script that produces an output containing '/.ssh'.
I am trying to find a way of parsing only this data from a single line, without removing any other special characters contained within the output as a result of the parse.
Any help would be appreciated (6 Replies)
Discussion started by: Raggedranger333
6 Replies
3. Shell Programming and Scripting
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
Discussion started by: mohsin.quazi
1 Replies
4. Shell Programming and Scripting
Hi,
Could you please help me in removal of newline chracter present in between the double quotes and replacing it with space.
For example ...
Every field is wrapped with double quotes with comma delimiter, so I need to travese from first double quote occerence to till second double... (7 Replies)
Discussion started by: vsairam
7 Replies
5. Shell Programming and Scripting
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies
6. Shell Programming and Scripting
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks (1 Reply)
Discussion started by: mrpugster
1 Replies
7. Shell Programming and Scripting
When editing a file, vi displays a special character as ^L. Can you tell me the escaped character to be used in awk? And can that escaped character be used in a regexp in both sed and awk? (7 Replies)
Discussion started by: dmesserly
7 Replies
8. Shell Programming and Scripting
Hi,
The command - id | awk '{print $1}' - returns the following:
uid=9028(luke)
What do I need to further that awk so that I only have "luke", I want to set this as a variable.
Thanks in advance,
Lukas.
P.S: I've come up with:
USER1=`id | awk F'(' '{print $2}' | awk -F')' '{print... (4 Replies)
Discussion started by: luke222010
4 Replies
9. Shell Programming and Scripting
can anyone share script for how to remove control m character (1 Reply)
Discussion started by: pw227j
1 Replies
10. UNIX for Beginners Questions & Answers
Hi,
on ksh
What does the following do?
grep -v "toolbox" $home_oracle/.profile >$home_oracle/.profile.$$ Thanks.
Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: big123456
3 Replies