Search Results

Search: Posts Made By: RJG
9,353
Posted By RJG
Rajinder, It works magically.Thanks
Rajinder,

It works magically.Thanks
9,353
Posted By RJG
Count null values in a file using awk
I have the following a.txt file

A|1|2|3|4|5|
A||2|3|0||
A|1|6||8|10|
A|9|2|3|4|1|
A|0|9|3|4|5|
A||2|3|4|5|
A|0|av|.9|4|9|

I use the following command to count null values for 2nd field
...
12,623
Posted By RJG
Get the line number in shell script
I have one text file

1 2 3
a 5
4 4 3

where i want to print the line number

while read line
do
line_no=`awk '{print NR, $0}'`
echo 'In line no $line_no'
done <$txt_file

If i...
2,688
Posted By RJG
Thanks for your reply.The xml removal is part of...
Thanks for your reply.The xml removal is part of one big shell script and the existing script is in bash and I am stuck in xml tag removal . If the 'st' value is 154, then the whole <b> tag will be...
2,688
Posted By RJG
Read xml tags and then remove the tag using shell script
<Start>
<Header>
This is header section
</Header>
<Body>
<Body_start>
This is body section
<a>
<b>
<c>
<st>111</st>
</c>
<d>
<st>blank</st>
</d>
</b>
</a>
</Body_start>...
11,850
Posted By RJG
Thanks Rudi for your reply ---------- Post...
Thanks Rudi for your reply

---------- Post updated 11-02-16 at 06:09 AM ---------- Previous update was 11-01-16 at 10:08 AM ----------






Hi Rudi,

I have tried with your code; It...
11,850
Posted By RJG
Hi Rudi, first record has three zeros...
Hi Rudi,


first record has three zeros because (7-length of (1265)) that is (7-4)=3 zeros
first record has two nines because (7-length of 76548)) that is 7-5=2 nines


And for 2 nd record
...
11,850
Posted By RJG
Read csv file, convert the data and make one text file in UNIX shell scripting
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"

I need to make the output data should look like this and the output data will be...
2,822
Posted By RJG
Sorry I dont know perl..so Thanks
Sorry I dont know perl..so
Thanks
2,822
Posted By RJG
Thank you for your reply . In the above code,...
Thank you for your reply .
In the above code, newly appended word 'c000000new' shifts the next word 'c00' from it's position.
But the next word should not move from it's previous position
Can I...
2,822
Posted By RJG
Help me in awk or sed in UNIX
I have a fixed length file a.txt that looks like

a@ a00 a00000 a00 a000000 a00 a0000 a0000 a00000000 a01
a@ a1 a2 a11 a22 a12 a13 a44 a45 a54 a65 ...
10,980
Posted By RJG
Help me in awk or sed in UNIX
I have a fixed length file that looks like
a@ a00 a00000 a00 a000000 a00 a0000 a0000 a00000000 a01
a@ a1 a2 a11 a22 a12 a13 a44 a45 a54 a65 a76 a77...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy