Search Results

Search: Posts Made By: natalie23
2,004
Posted By natalie23
how to extract the info in the tag from a xml file
Hi All,
Do anyone of you have any idea how to extract each<info> tag to each different file. I have 1000 raw files, which come in every 15 mins.( I am using bash)
I have tried my script as below,...
3,577
Posted By natalie23
Hi Daptal, Kurumi,Rdcwayx, Thanks for your...
Hi Daptal, Kurumi,Rdcwayx,
Thanks for your reply.
All it works.

However, sometimes my raw files will have different missing columns which is not predicatable.Then how to make codes more...
3,577
Posted By natalie23
how to include the missing column in the original file using awk
Hi Experts,
The content of the raw file:

date,nomsgsent,nomsgnotdeliver,nomsgdelay
201003251000,1000,1,2
201003251000,900,0,0
201003251000,1450,0,0
201003251000,1230,0,0

However,...
1,726
Posted By natalie23
Hi rdcwayx & Franklin, Can explain the code...
Hi rdcwayx & Franklin,

Can explain the code to me?

Besides I have encountered

nawk:file21.txt too many open file


is it I need to close the file


nawk '/^<dt>/{dt=$0}
...
1,726
Posted By natalie23
HI rdcwayx, I have errors when ...
HI rdcwayx,

I have errors when

/^<r>/{v[++k,j]=$0}

and

{printf "%s\n%s\n",tp[m],v[o,m] >fn }
1,769
Posted By natalie23
Hi Ygor, Can you please explain the code? ...
Hi Ygor,

Can you please explain the code?

May I know why need to have "$3" when redirect the file?

Besides I have tried the code, but in each file I just have the output of <wt> tag

I...
1,769
Posted By natalie23
Hi Ygor, Dunno whether I ask ask you...
Hi Ygor,



Dunno whether I ask ask you futher or not in d forum..how about if my file becomes like this:





<gp>

<wt>a</wt>

<wt>b</wt>

<wt>c</wt>

<ct>
1,769
Posted By natalie23
how to print the certain lines in a file to different files
Hi All,

File that I have:

<ct>
<name>group
<value>1
<value>2
<value>3
</ct>-->file

The output that I needed is

<ct>
<name>group
<value>1 -->file1

<ct>
<name>group...
2,358
Posted By natalie23
Hi Guys, Really thanks for your kind help!...
Hi Guys,

Really thanks for your kind help! :)
1,726
Posted By natalie23
How to extract lines from a file to different file
Hi All,
I have a file which is look like this
<st>
<dt>200912240100Z</dt>
<gp>900</gp>
<cts>resendfail</cts>
<cts>resendsuccessful</cts>
<cts>resendpending</cts>
<info>
<tp>bs=1,slot=1</tp>...
2,358
Posted By natalie23
How to expand the same word?
Hi All,
May I know how to expand the words?
e.g:
a
aa
aaa
aaaa
I have try to use
for (i=0;i<5;i++)
do
c="a"
echo -n $c
done
but the output is aaaaa. Is it need to use array?:confused:...
3,924
Posted By natalie23
Hi summer cherry, Thanks for your help. ...
Hi summer cherry,

Thanks for your help.

However, from your code, where should I put my code?

Thanks!
3,924
Posted By natalie23
Filename from splitting files to have the same filename of the original file with counter value
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.

The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml...
2,512
Posted By natalie23
how to let the perl script to run for each file
Hi,

I have more than 1 files in the directory. In bash, I can use

cd /work

for x in `ls`
do
:
:
done

to run for each file in the directory.

How about in perl script?
...
7,037
Posted By natalie23
Hi anchal...
Hi anchal _khare,matrixmadhan,fpmurphy,summer_cherry

Thank you very much for your help!!

---------- Post updated at 05:01 AM ---------- Previous update was at 05:00 AM ----------




Hi...
7,037
Posted By natalie23
how to parse the file in xml format using awk/nawk
Hi All,
I have an xml file with the below format.
<a>111</a><b>222</b><c>333<c><d><e>123</e><f>234</f><d><e>456</e><f>789</f>
output needed is

111,222,333,123,234
111,222,333,456,789

nawk...
1,362
Posted By natalie23
Hi ryandegreat, Thanks for your help. ...
Hi ryandegreat,

Thanks for your help.

But for this one {if (NR>78)
{printf ( "%s,", $2 "\n")}}

the output become like this
3,
0,
0,
0,
0,
0,
:
:
:
3

Is there any other way...
1,362
Posted By natalie23
how to convert this file using awk
Hi all,
I have a file with this format..

Alphabet,0
1,0,
ID,1,
a,0,
b,0,
c,0,
d,0,
e,0,
f,0,
:
:
:
z,2;
2,0,-->another record
ID,2,
a,0,
b,0,
3,599
Posted By natalie23
Hi Zaxxon, I have tried the above thread...
Hi Zaxxon,

I have tried the above thread using awk but unsuccessful:
#!/bin/bash
echo "FARM_no,apple,pineapple,grapes,orange,banana'
awk -F "," '{ print $2}' text file

But I am not sure...
3,763
Posted By natalie23
how to convert this file into comma delimited format
Hi experts,
I need urget help! I have the a text file with this format:

Types of fruits
Name of fruits
1,1
Farm_no,1
apple,1
pineapple,1
grapes,1
orange,1
banana,1
2,2--->this is the...
3,599
Posted By natalie23
Urgent! need help! how to convert this file into comma delimited format
Hi experts,
I need urget help! I have the a text file with this format:

Types of fruits
Name of fruits
1,1
Farm_no,1
apple,1
pineapple,1
grapes,1
orange,1
banana,1
2,2--->this is the...
4,203
Posted By natalie23
parsing(xml) using nawk/awk
Hi ,

I have an xml format as shown below:
<Info>
<last name="sean" first name="john"/>
<period="5" time="11"/>
<test value="1",test2 value="2",test3 value="3",test4 value="5">
<old>...
2,760
Posted By natalie23
hi kshji, I know what is wrong with my code...
hi kshji,

I know what is wrong with my code because of {Age_first=$3; continue}.May I know why the code should like this

{ Age_first=$2; continue } and is not {Age_first=$3; continue} ? Since...
2,760
Posted By natalie23
Hi kshji, I have try the code, but...
Hi kshji,

I have try the code,

but the output is
Details 1:


Nothing is display after Details 1.

thanks.
2,760
Posted By natalie23
hi kshji, I am a newbie in unix and also...
hi kshji,

I am a newbie in unix and also awk syntax.
Can you explain in more detail? e.g: I do not understand
END { # last record out
print ....
}

Thanks again for...
Showing results 1 to 25 of 26

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