10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an input file as below
Emp1|FirstName|MiddleName|LastName|Address|Pincode|PhoneNumber
1234|FirstName1|MiddleName2|LastName3| Add1 || ADD2|123|000000000
Output :
1234|FirstName1|MiddleName2|LastName3| Add1 ,, ADD2|123|000000000
OR
1234,FirstName1,MiddleName2,LastName3, Add1 ||... (2 Replies)
Discussion started by: styris
2 Replies
2. Shell Programming and Scripting
I want to bring values in the second column into single line for uniq value in the first column.
My input
jvm01, Web 2.0 Feature Pack Library
jvm01, IBM WebSphere JAX-RS
jvm01, Custom01 Shared Library
jvm02, Web 2.0 Feature Pack Library
jvm02, IBM WebSphere JAX-RS
jvm03, Web 2.0 Feature... (10 Replies)
Discussion started by: kchinnam
10 Replies
3. Shell Programming and Scripting
I have a comma delimited file of major codes and descriptions. I want to replace all occurrences of spaces with underscores up to the first comma (only in the first field), but not replace spaces following the comma. For instance I have the following snippet of the file:
EK ED,Elementary and... (7 Replies)
Discussion started by: tdouty
7 Replies
4. Shell Programming and Scripting
Hi All,
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line)... (4 Replies)
Discussion started by: express14
4 Replies
5. Shell Programming and Scripting
I,
I have a file and i need to replace comma and blank space with comma and 0.
cat file.txt
a,5
b,1
c,
d,
e,4
I need the output as
cat file.txt
a,5
b,1
c,0
d,0 (4 Replies)
Discussion started by: jaituteja
4 Replies
6. Shell Programming and Scripting
hi,
I am trying to replace comma with pipe, but the issue is that i want to ignore the commas inside qoutes.
for example:
i have file with the string: 1,"2,3",4,"5","6,7"
the result should be : 1|"2,3"|4|"5"|"6,7"
i trying to use sed and awk (match function) for that, but i did not... (4 Replies)
Discussion started by: gabik
4 Replies
7. Shell Programming and Scripting
Source data:
"123","aaa bbb CCC","12000"
"134","HHH,bbc","13000"
i have a delimited file. i want to replace with the pipe.The sed command is not working for replacing a delimeter.
Command :
sed s/\,/\|/g filename
Output : When i run the command it is replacing the columns value... (7 Replies)
Discussion started by: number10
7 Replies
8. Shell Programming and Scripting
Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL.
example
0 , '' , '' , 0 , 195.538462
change it to
0... (5 Replies)
Discussion started by: gumal901
5 Replies
9. Shell Programming and Scripting
I have file like this
FileA:
abc , "helloworld" , america
def,asia, japan
ghi, africa, ipl
Output Needed:
abc,"helloworld",america
def,asia,japan
ghi,africa,ipl
I would like to implement using awk.
I want to trim each field for its leading and trailing spaces. (7 Replies)
Discussion started by: pinnacle
7 Replies
10. Shell Programming and Scripting
Hi,
I have a requirement to replace the comma's inside the double quotes. The comma's inside the double quotes will get changed dynamically.
Input Record:
"Washington, DC,Prabhu,aju",New York
Output Record:
"Washington| DC|Prabhu|aju",New York
I tried with the below command but it... (3 Replies)
Discussion started by: prabhutkl
3 Replies