10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Discussion started by: as7951
3 Replies
2. Shell Programming and Scripting
The awk below executes and update the desired field in my first awk. However, the white space between
nonsynonymous SNV in $9 is being split into tabs and my attempt to correct this does not update the field
unless it is removed. I am not sure what I am doing wrong? Thank you :).
file1
... (4 Replies)
Discussion started by: cmccabe
4 Replies
3. UNIX for Beginners Questions & Answers
Hi,
I am trying to read an Oracle listener log file line by line and need to separate the lines into several fields. The field delimiter for the line happens to be an asterisk.
I have the script below to start with but when running it, the echo command is globbing it to include other... (13 Replies)
Discussion started by: newbie_01
13 Replies
4. UNIX for Dummies Questions & Answers
Hi... I can't find my little red AWK book and it's been a long while since I've awk'd. But I need to take a CSV file and convert the first word of the fifth field to its own field by replacing a space with a comma.
This is for importing a spreadsheet of issues into JIRA...
Example:
a line... (9 Replies)
Discussion started by: Tawpie
9 Replies
5. Shell Programming and Scripting
Hi Experts,
i need to change delimiter from tab to ","
sample test file
cat test
A0000368 A29938511 072569352 5 Any 2 for Ģ1.00 BUTCHERS|CAT FOOD|400G Sep 12 2012 12:00AM Jan 5 2014 11:59PM Sep 7 2012 12:00AM M 2.000 group 5
... (2 Replies)
Discussion started by: Lakshman_Gupta
2 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
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Discussion started by: kevintse
8 Replies
8. Shell Programming and Scripting
I have a file with three fields and field delimiter '|' like:
abc|12:13:45|123
xyz|12:87:32|
qwe|54:21:09
In the file the 1st line has proper data -> abc|12:13:45|123
,the 2nd line doesnt has data for the 3rd field which is okay
, the 3rd line doesnt has data for the 3rd field as well the... (5 Replies)
Discussion started by: mehimadri
5 Replies
9. UNIX for Advanced & Expert Users
Hello,
I had posted earlier about printing fields using AWK, but now I have a slightly different problem. I have text files in the format:
1*2,3,4,5
and wish to print the first, third, and fifth fields, including the asterisk and commas. In other words, after filtering it should look... (1 Reply)
Discussion started by: Jahn
1 Replies
10. Shell Programming and Scripting
How can i set a variable field delimiter using awk??
I wanna do something like this ,but i canīt get the correct syntaxis :
VARI=TEST
echo "0121212TESTxvcshaashd"|awk 'FS="$VARI" {print $2}'
Thanks. (2 Replies)
Discussion started by: Klashxx
2 Replies