10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Everyone..
I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files
FileP.txt
... (2 Replies)
Discussion started by: YogeshG
2 Replies
2. Shell Programming and Scripting
Hi,
I have a pipe delimited file as below and I need to replace the 2nd column of each line with null values.
1|10/15/2011|fname1|lname1
2|10/15/2012|fname2|lname2
3|10/15/2013|fname3|lname3
Output file:
1||fname1|lname1
2||fname2|lname2
3||fname3|lname3
I tried this
... (2 Replies)
Discussion started by: member2014
2 Replies
3. Shell Programming and Scripting
Hello ppl
I have a requirement to split (cut in unix) a file (A.txt) which is a pipe delimited file into A1.txt and A2.txt
Now I have to join (paste in unix) this A2.txt with external file A3.txt to form
output file A4.txt which should be CSV (comma separated file) so that third party can... (25 Replies)
Discussion started by: etldev
25 Replies
4. Shell Programming and Scripting
Hi,
I have a data like
Input:
12||34|56|78
Output:
XYZ|12||34|56|78
I tried like this , but it puts it on another line
awk -F "|" ' BEGIN {"XYZ"} {print $0} 'file
Any quick suggessitons in sed/awk ? am using HP-UX (3 Replies)
Discussion started by: selvankj
3 Replies
5. Homework & Coursework Questions
hi,
I have pipe delimited flat file as below
1|ab|4.5|9|
2|ac|3|12|
3|ac|4.5|8|
i want to show (display) only 3rd field between pipes.
please help (1 Reply)
Discussion started by: vai15517
1 Replies
6. Shell Programming and Scripting
Hi,
I am trying to move a column from one position to another position in a delimited file. The positions are dynamic in nature and are available by environmental variables. Also the file can have n number of columns.
Example:
Initial Column Position=1
Final Column Position=3
Delimiter='|'
... (2 Replies)
Discussion started by: ayan153
2 Replies
7. Shell Programming and Scripting
I have a file which looks like this:
73450 articles and news developmental psychology 2006-03-30 16:22:40 1 http://www.usnews.com
73450 articles and news developmental psychology 2006-03-30 16:22:40 2 http://www.apa.org
73450 articles and news developmental psychology 2006-03-30... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
8. Shell Programming and Scripting
Hi,
I have the below flat filewith ~ as delimiter
emp.no~dept.name
I need to append corresponding emp.name column which will come from database based on emp.no in the flat file.
I need the output as
dept.name~emp.name
Can anyone please help me in resolving this issue..
I tried the... (2 Replies)
Discussion started by: siri_886
2 Replies
9. Shell Programming and Scripting
Hi, Iam new to unix. I have one input file .
Input file :
ID1~Name1~Place1
ID2~Name2~Place2
ID3~Name3~Place3
I need output such that only first column should change to fixed width column of 15 characters of length.
Output File:
ID1<<12 spaces>>Name1~Place1
ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies
10. Shell Programming and Scripting
file1.txt :
india pakistan bangladesh
japan canada africa
USA srilanka Nepal
file2.txt
Delhi
Tokyo
washington
I have to cut the first column of file1.txt and apend it with file2.txt as another column like this
Delhi india
Tokyo japan
washington USA
... (4 Replies)
Discussion started by: sakthifire
4 Replies