10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have file 2.txt and I want to change the delimiter form , to :
Not sure what is the problem with below command
cat 2.txt
1,a
2,b
3,d
awk 'BEGIN {FS=",";OFS=":";} {print $0}' 2.txt
Please use CODE tags as required by forum rules! (11 Replies)
Discussion started by: vamsi.valiveti
11 Replies
2. Shell Programming and Scripting
Hi,
Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV
I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters.
Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
3. Shell Programming and Scripting
Hello All,
I need to convert a csv file to pipeline delimiter file in UNIX. The data in file itself contains comma with double qouted qualifier apart from the comma separator. Let me know how to do it. Appreciate any help if awk can be used to do it.
Mentioned below is the sample record of... (14 Replies)
Discussion started by: Arun Mishra
14 Replies
4. Shell Programming and Scripting
HI,
I have a file like below
"103865","103835","Zming","","Zhu","103965","Sunnyvale","US",
"116228","116227","Morlla","","Kowalski","113228","Paese "(Treviso)""IT"
I want to validate the 7th column which is below.
"Sunnyvale"
"Paese
In the above 7th column Paese is not ended with... (9 Replies)
Discussion started by: Krrishv
9 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have a file in which delimiter is ';'
However if the delimiter is within "" it is a part of the string and not delimiter.
How to get the fields ? I want to replace the delimiter ';' to '|'.
The file contains data like this :
11111; “2222 2222”; “3333; 3333”; “4444 ""44444”
The file... (2 Replies)
Discussion started by: dashing201
2 Replies
6. Shell Programming and Scripting
Here is my source, i have million lines like this on a file.
disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=& drc=&mo=&sid=&lang=EN&loc=JPN
I want to split this into columns in order to load in database, anything starts with"&mjv=6" as first... (13 Replies)
Discussion started by: elamurugu
13 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am having a file with the delimiter '|^'.
File name:test_dlim.csv
I want to cut the first field of this using awk command.
I tried with the help of the following link:... (2 Replies)
Discussion started by: boopathyvasagam
2 Replies
8. Shell Programming and Scripting
Hello I need some help in outputting Fields when the delimiter has changed:
echo "test1,test2 | test3,test4,test5" | awk -F"," '{print $1,"COUNT",$2,$4}'
prints out:
test1 COUNT test2 | test3 test5
But how to change the -F"," to -F"|" delimiter, so that it separates the
fields from $2... (2 Replies)
Discussion started by: sdohn
2 Replies
9. Shell Programming and Scripting
Hi everybody,
This time I am having one issue in perl.
I have to create comma separated file using the following type of information. The problem is the columns do not have any specific delimiter. So while using split I am getting different value. Some where it is space(S) and some where it is... (9 Replies)
Discussion started by: Amiya Rath
9 Replies
10. UNIX for Dummies Questions & Answers
Hi,
My file looks like
abc$%sdfhs$%sdf$%sdfaf$%
here as seen delimiter is $%...now how cas i take out second field as cut command expect delimiter as single charecter only.....is there is any other way
thanks and regards
mahabunta (9 Replies)
Discussion started by: mahabunta
9 Replies