10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I have file as given below
040|14300|40.0|563000
042|13200000|40.0
041|100|40.0
043|10000|40.0
045|102|40.0
I want to check
if field 4 is null then I have to place | in position 4.
result set should be
040|14300|40.0|563000
042|13200000|40.0|
041|100|40.0|
043|10000|40.0|... (9 Replies)
Discussion started by: shabeena
9 Replies
2. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
3. Shell Programming and Scripting
Hi All,
I get a file on weekly basis from client. I need to write a script which make sure the file should have 20 columns after the first column. If not then the script should add the remaining columns and default them to space(except for 2nd and 3rd). and at the same time the script should... (25 Replies)
Discussion started by: Arun Mishra
25 Replies
4. Shell Programming and Scripting
Hi All,
I have a file(Pipe Delimited) where i need to add a blank field before the last field and a blank field after the last field. Please help. I have provided below the sample input records and desired output.
Sample Input:
A0010000|Abilene TX A 1|A0010957|Dallas TX|A0010998|West|US... (5 Replies)
Discussion started by: Arun Mishra
5 Replies
5. Shell Programming and Scripting
Hi All,
I have a file(Pipe Delimited) where i need to add a blank field before the last field and a blank field after the last field. Please help. I have provided below the sample input records and desired output.
Code:
Sample Input: A0010000|Abilene TX A 1|A0010957|Dallas... (0 Replies)
Discussion started by: Arun Mishra
0 Replies
6. Shell Programming and Scripting
Hi,
I have the following file, I'd like to add an additional blank field to this file
This is a tab delimited file, I have tried the same thing on excel, but looking for a unix solution.
Here is my input:
Country Postal Admin4 StreetBaseName StreetType
HUN 2243 Kóka Dózsa György ... (3 Replies)
Discussion started by: ramky79
3 Replies
7. Shell Programming and Scripting
Hello everyone,
Here is what i am trying to accomplish. I have a transaction log that I want to to add a field. The fields in the transaction log are tab delimited FYI. My goal is to add a column specifying the category/type to each item purchased. I have created a two column "conversion table"... (2 Replies)
Discussion started by: SpencerClark
2 Replies
8. UNIX for Dummies Questions & Answers
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.
I just want this one question answered: How can I assign fields from a file(comma separated) to variables?
My goal is to check... (0 Replies)
Discussion started by: chickeneaterguy
0 Replies
9. Shell Programming and Scripting
I'm hoping someone can help me on this. I have a data file that greatly simplified might look like this:
sec;src;dst;proto
421;10.10.10.1;10.10.10.2;tcp
426;10.10.10.3;10.10.10.4;udp
442;10.10.10.5;10.10.10.6;tcp
sec;src;fac;dst;proto
521;10.10.10.1;ab;10.10.10.2;tcp... (3 Replies)
Discussion started by: eric4
3 Replies
10. Shell Programming and Scripting
Hi there,
I have a comma seperated file with nine fields
the fields are
rerate: "numberTX",field2,field3,field4,field5.....
I want to do this to the file
reate: "field5TX",field2,field3,field4,field5
I know I can do this using AWK, but the thing giving me fits is that I... (5 Replies)
Discussion started by: rjsha1
5 Replies