10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have data such as below where the value in second field is the same as that in the row after.
123456,22222,John,0,xyz
234567,22222,John1,1,cde
43212,3333,Jean,3,pip
84324,3333,Abel,2,cat
I'd like to rearrange the output like below to put such records beside each other and separated with... (5 Replies)
Discussion started by: james2009
5 Replies
2. UNIX for Advanced & Expert Users
In awk the field seprator is not working properly, I am trying to cut the fields from the file based on the delimiter example comma (,)
awk -F, "{print {$1 FS $3 FS $5 FS FS $2}}" Sample.csv
But i am not getting desired output can anyone help me how to check real ascii comma there in my... (9 Replies)
Discussion started by: rspwilliam
9 Replies
3. Shell Programming and Scripting
Hi All
I need help to separate entries after commas in my
I have 2 columns in my file like this
Ramush, Shyam, Mohan First
Ram, Mohan, Kaavya Second, Fourth
Kavi, Ram, Shaym, Mohan Third
I ahve to separate entries after comma in a separate row... (9 Replies)
Discussion started by: kareena
9 Replies
4. Shell Programming and Scripting
Hi all
This time my input conatin 3 columns:
ERCC1 (PA155) Platinum compounds (PA164713176) Allele A is not associated with response to Platinum compounds in women with Ovarian Neoplasms as compared to allele C .
CES1 (PA107) methylphenidate (PA450464) Genotype CT is not... (4 Replies)
Discussion started by: Priyanka Chopra
4 Replies
5. Shell Programming and Scripting
Hi all,
I have afile with following data
I want to separate, count the entries with N/A in front of it so I will have all the entries with N/A in front seprate file .
so output shuld be (7 Replies)
Discussion started by: manigrover
7 Replies
6. Shell Programming and Scripting
I have a comma (,) delimited file.
106232145,"medicare","medicare,medicaid",789
I would like to count the number of fields in each line.
I tried the below code
awk -F ',' '{print NF-1}'
This returns me the result as 5 instead of 4. This is because the awk takes... (9 Replies)
Discussion started by: machomaddy
9 Replies
7. Shell Programming and Scripting
Hi guys
I have two file which I sdiff.
ie
file 1: AA,12,34,56,,789,101,,6666
file 2: AA,12,34,56,,789,101,,7777
The last comma separated value will always change from one day to the next.
Is there another unix utility I can use that will sdiff two files but ignore the last comma... (1 Reply)
Discussion started by: wny201
1 Replies
8. UNIX for Dummies Questions & Answers
Hi, been searching Google for like an hour and I doubt I got the right keywords so might as well ask here.
What I need:
Before:
Article1.txt 564
Article2.txt 799
Article3.txt 349
Article4.txt 452
* Separate files over 400 wordcount *
After:
Article1.txt 564... (3 Replies)
Discussion started by: Richard2000
3 Replies
9. Shell Programming and Scripting
Hi,
I am trying to truncate word after comma in a file ONLY if there are already 2 words BEFORE comma. If there is one word or 3 or more words BEFORE comma, then I have to leave the data AS IS. See below for example.
Input File :
John Smith, Manager
Smith, John Frank
J F K... (2 Replies)
Discussion started by: msalam65
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent.
E.g : username empid
------------------------
sri 123
to
username,empid
sri,123
Thanks,
Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies