Search Results

Search: Posts Made By: vaskarbasak
10,484
Posted By vaskarbasak
Thanks!!! finally i have solved my problem....
Thanks!!!
finally i have solved my problem....
10,484
Posted By vaskarbasak
Can u give me any idea how can i remove Ctrl-M...
Can u give me any idea how can i remove Ctrl-M (^M) from my out put file.
10,484
Posted By vaskarbasak
I have changed my code awk -F\| '{ if...
I have changed my code

awk -F\| '{
if (k[$1])
k[$1] = sprintf("%s,%s,%s,%s,%s=%s",k[$1],$5,$6,$7,$2,$3)
else
k[$1] = sprintf("%s,%s,%s,%s,%s=%s", $1,$5,$6,$7,$2,$3)
} END...
10,484
Posted By vaskarbasak
I am very much new to shell script , I am facing...
I am very much new to shell script , I am facing a big problem in parsing a flat file.

My input file format is just like bellow



794051400123|COM|21|0|BD|R|99.98
...
10,484
Posted By vaskarbasak
yes... ...
yes...

794051400123,BD,R,99.98,COM=24,MOM=62,RNO=73
794051413727,BD,R,28.99,COM=11,MOM=4
794051415622,BD,R,28.99,COM=23,MOM=80
883929004676,BD,R,28.99,COM=0,MOM=0
883929017164,BD,R,39.99,MOM=0...
10,484
Posted By vaskarbasak
here i past my code:- awk -F '|' 'NF==0 {...
here i past my code:-

awk -F '|' 'NF==0 { next } $1 == prev {collect=collect","$2"="$3; next }
{ if (collect) print collect; prev = $1; collect = $1","$5","$6","$7","$2"="$3; next }
END { if...
10,484
Posted By vaskarbasak
Thanks All.... it is working.... but i am...
Thanks All....
it is working....
but i am facing another problem

while i am trying to change the format

like

794051400123|99.98|COM|24|MOM|62|RNO|73|SOM|25

it gives me result like
...
1,359
Posted By vaskarbasak
No.it is not give any type of error.But it is not...
No.it is not give any type of error.But it is not working...
1,359
Posted By vaskarbasak
not working...
not working...
17,105
Posted By vaskarbasak
add "|" at the end of each line...
add "|" at the end of each line...
1,359
Posted By vaskarbasak
Concate 2 line into 1 line
Hi,

000732140470,DD,R,29.99

,SOM=1
000732145376,DD,R,29.99

,MOM=0,SOM=0
000732155320,DD,R,29.99

,MOM=0
000732156860,DD,D,9.99

,MOM=3,RNO=3,SOM=1
000732156921,DD,D,9.99
...
17,105
Posted By vaskarbasak
Hi, I have a file like these format ...
Hi,

I have a file like these format

733961132847|COM|0|0|BD|R|79.95

733961134346|COM|0|0|BD|R|34.95

807280134490|COM|0|0|BD|R|39.99

794051400123|COM|36|0|BD|R|99.98
...
17,105
Posted By vaskarbasak
replace '"|\n" with new line in shell script
Hi All,

How can i replace '"|\n" with new line in shell script?

Thanks!

vaskar
10,484
Posted By vaskarbasak
Such kind of problem occurs only first line of...
Such kind of problem occurs only first line of any files.

Correct

794051400123|COM|24|MOM|62|SOM|25|RNO|73
794051413727|COM|11||MOM|4|RNO|8

Wrong

COM|24|MOM|62|SOM|25|RNO|73...
10,484
Posted By vaskarbasak
I think some problem in line '$1 == prev {...
I think some problem in line
'$1 == prev { collect=collect "|" $2 "|" $3; next }
If i have changed the code
$1 == prev { if(collect) collect=collect "|" $2 "|" $3; next }
it works..

.
10,484
Posted By vaskarbasak
Hi, I am facing a big problem...It gives me...
Hi,

I am facing a big problem...It gives me wrong result

like

|COM|24|MOM|62|SOM|25|RNO|73
794051413727|COM|11||MOM|4|RNO|8

pls help me.

Thanks!
vaskar
5,004
Posted By vaskarbasak
download specified file from ftp server
Hi all,

I'm having problems downloading files from ftp server. I have to download only those files that name starts with YYYYMMDD.But file comes like the format "20080624221035.TXT".Also how i can...
10,484
Posted By vaskarbasak
Thanks!! It is working....:p
Thanks!! It is working....:p
10,484
Posted By vaskarbasak
I don't know python script.Is it possible write...
I don't know python script.Is it possible write simple shell script? I have done it but it takes lot of time.
1,938
Posted By vaskarbasak
Thanks! :) it is working....
Thanks! :) it is working....
1,938
Posted By vaskarbasak
parse coloum in a file
I have a file like the format
...
10,484
Posted By vaskarbasak
concatenate all duplicate line in a file.
Hi All,

i have a zip file like the format

794051400123|COM|24|0|BD|R|99.98

794051413727|COM|11|0|BD|R|28.99

794051415622|COM|23|0|BD|R|28.99

883929004676|COM|0|0|BD|R|28.99...
Showing results 1 to 22 of 22

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