10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below code runs and creates an output file with three sections. The first 2 sections are ok, but the third section doesn't seem to put a . in all the fields that are blank. I don't know if this is what causes the last two fields in the current output to shift to a newline, but I can not seem... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
Hi Forum.
I tried to search for the solution online but I couldn't find specifically what I'm trying to achieve.
I want to replace Null with 0 in column position#6; Any other values would be retained.
Before:
52653363|3407732947|28-MAR-2014... (3 Replies)
Discussion started by: pchang
3 Replies
3. Shell Programming and Scripting
Hi,
I've a pipe delimited file and wanted to replace the 3rd field to 099990 where the values are null. How can I achieve it using awk or sed.
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S... (12 Replies)
Discussion started by: rudoraj
12 Replies
4. Shell Programming and Scripting
Hello Gurus !
I have what probably amounts to a few simply changes to fix; however for the life of me I cannot seem to get it ti work. I need to align the output of my script (I am writing to a logfile)... here's the lines in my code:
if
then
echo "NODE: $node" >> $logfile... (6 Replies)
Discussion started by: gvolpini
6 Replies
5. 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
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,
I've a pipe delimited file where I want to find out a number of lines where 1st 2nd and last field are null using awk/sed. Is it possible?
Thanks (5 Replies)
Discussion started by: rudoraj
5 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
Hi,
can I do something like this to add a condition of checking if the 4th field is number or space or blank also:
awk -F, '$4 /^*||*/' MYFILE >> OTHERFILE
I also want the other part i.e. I need to exclude all lines whose 4th field is space or blank or number:
MYFILE
a,b,c,d,e
a,b,c,2,r... (2 Replies)
Discussion started by: praveenK_Dudala
2 Replies
10. Shell Programming and Scripting
Hi All,
I have some csv files out of which i want to find records which have empty values in either the 14th or 16th fields.
The following is a sample.
$cut -d',' -f14,16 SPS* | head -5
VOIP_ORIG_INFO,VOIP_DEST_INFO
sip:445600709315@sip.com,sip:999@sip.com... (2 Replies)
Discussion started by: rahulrathod
2 Replies