Search Results

Search: Posts Made By: Suneelbabu.etl
1,728
Posted By Suneelbabu.etl
hai guys, Thanks for the giving reply, ...
hai guys,

Thanks for the giving reply,

Can explain above script, because i am new to scripting.

Thanks.
1,728
Posted By Suneelbabu.etl
Find max length of the field and then replace zero
hai guys,

pick the 1st field and calculate max length.
if suppose max length is 2,
then compare the all records if <2 then add zero's prefix of the record.
for ex:
s.no,sname
1,djud
37,jtuhe...
6,066
Posted By Suneelbabu.etl
this is also concatenate all records.. i mean all...
this is also concatenate all records.. i mean all rows
6,066
Posted By Suneelbabu.etl
Thanks Shoo, But it concatenate all records....
Thanks Shoo,

But it concatenate all records. i want only remove the new line..

i have logic i.e
logic is every row should be 5 comma's if not just concatenate to next line.. that's it.. plz...
6,066
Posted By Suneelbabu.etl
cat bodysh awk -F"," 'NR == 1 {col = NF; prev =...
cat bodysh
awk -F"," 'NR == 1 {col = NF; prev = $0};
NR > 1 {if(NF == col) {print prev; prev = $0}
else {prev = prev " " $0}}
END {print prev}' bodysh > oput


Here bodysh is the file...
6,066
Posted By Suneelbabu.etl
[Administrator.ravan-PC] → sh suneel.sh ': No...
[Administrator.ravan-PC] → sh suneel.sh
': No such file or directory
awk: cmd. line:1: Unexpected token


IT DISPLAY LIKE THIS..
6,066
Posted By Suneelbabu.etl
but begin clause its not working.. dude.
but begin clause its not working.. dude.
6,066
Posted By Suneelbabu.etl
hi wisecracker, the file name is bunny only but...
hi wisecracker,
the file name is bunny only but i entered into body box it take 'B' that's it..

I tried so many times but i didnt get where the fault occur, then only i sent u again.

To day...
6,066
Posted By Suneelbabu.etl
SAME ERROR OCCURED NO CHANGE..
SAME ERROR OCCURED NO CHANGE..
6,066
Posted By Suneelbabu.etl
Hi Wisecracker, i used this code #!/bin/bash ...
Hi Wisecracker,
i used this code
#!/bin/bash
# rm_newline.sh
cat bunny
tr -d '\n' < bunny > NewFileName
echo ""
echo ""
cat < NewFileName
echo ""
echo ""
mynewfile=""
newline=0
n="1"...
6,066
Posted By Suneelbabu.etl
Thanks Corona, when i run this code it...
Thanks Corona,

when i run this code it display one error i.e
[`done abc1.csv outputfile.csv']
plz tel me.. i am a beginner to this.

---------- Post updated at 02:24 PM ---------- Previous...
6,066
Posted By Suneelbabu.etl
Hi Wisecracker, its not possible to use [tr]...
Hi Wisecracker,

its not possible to use [tr] command because in my file have 2 lacs rows.
how can i do.. thats why i am trying to write shell script. in that case only i remove new lines .. if...
6,066
Posted By Suneelbabu.etl
once take above data.. plz
once take above data.. plz
6,066
Posted By Suneelbabu.etl
Thanks for the replying.. can u explain this...
Thanks for the replying.. can u explain this command, because in that only i learn and next time i do it...

---------- Post updated at 01:26 PM ---------- Previous update was at 01:17 PM...
6,066
Posted By Suneelbabu.etl
Remove newline
i checked all commands, but those r not working properly..
requirement is...I have csv file. that have duplicates also like
INPUT
no,name,band,sal
1,"suneel",,10
1,"ravi
kumar",,20
2,"
bang...
6,066
Posted By Suneelbabu.etl
Remove newlines
Hi buddy's

my file are like this:
s.no,name,band,sal
1,"suneel",,10
2,"bargav
sand",,20
30,"
ebdug gil",,4

but i want
s.no,name,band,sal
1,"suneel",,10
2,"bargav sand",,20
30,"ebdug...
Showing results 1 to 16 of 16

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