Search Results

Search: Posts Made By: snayper
1,530
Posted By snayper
not work:( awk '!/^""$/ {if ( $0 ~ /^"[^,].+/)...
not work:(
awk '!/^""$/ {if ( $0 ~ /^"[^,].+/) { printf NR==1?$0:"\n"$0} else { printf $0}} END { printf "\n"} ' file.lis
awk: syntax error near line 1
awk: illegal statement near line 1

maybe...
1,530
Posted By snayper
sure: "2721348","2013-10-06","2013-10-06...
sure:

"2721348","2013-10-06","2013-10-06 15:54:37","Tree","1","0","1","1","paper","sumer","","ppd","no","no","anonymous","195","oo","Seria SP, kete","000000000126 ","Red...
1,530
Posted By snayper
thanks its work by 1 line file. Can you help...
thanks its work by 1 line file.

Can you help what can i do, if i have a file with 1 million lines which include 15 bad characters(apostrophe and enter).
1,530
Posted By snayper
Replace help
Hi experts,

I have a csv file where the delimiter is comma and the text between apostrophe.

Like this:

"aaa","bbb","ccc","ddd","eee","fff","ggg"


But now i have a lot of enter(end of...
1,739
Posted By snayper
Thank You! Thats not my file. My original...
Thank You!

Thats not my file. My original file is read only. Your work around is very good! Thank You!
1,739
Posted By snayper
od -c output: 0000000 " " , " " , ...
od -c output:
0000000 " " , " " , " " , " " , " " , "
0000020 " , " " , " " , " " \n " " , " "
0000040 , " " , " " , ...
1,739
Posted By snayper
input-output: alma@app2:/home/snayper$ cat...
input-output:
alma@app2:/home/snayper$ cat aaa.txt
"","","","","","","","",""
"","","","","","","","",""alma@app2:/home/snayper$ sed 's/"[^"]*"//g' ./aaa.txt
,,,,,,,,
alma@app2:/home/snayper$
1,739
Posted By snayper
Its not work if you make a text file by vi...
Its not work if you make a text file by vi editor. Try to make a file in windows whit this text:
"","","","","","","","",""

After you try again but whit 2 rows, like this:...
1,739
Posted By snayper
sed not see last row
Hi Everyone!

I have a problem my script. I'm useing sed to find the separate character in my text
sed 's/"[^"]*"//g' ./myfile.txt

My problem:
When the last row is doesn't has enter in the end...
1,756
Posted By snayper
i pasted into to command line: nawk -F,...
i pasted into to command line:

nawk -F, S=4000 '{ for ( i = 1; i <= NF; i++ ) { if ( length ( $i ) > S ) { $i = substr ( $i, 1, S ) OFS substr ( $i, S + 1 ) } } print }' OFS=, textfile.lis

and...
1,756
Posted By snayper
Thanks Your answer! i got this message: ...
Thanks Your answer!

i got this message:
awk: syntax error near line 1
awk: bailing out near line 1

I'm use solaris(maybe important).
1,756
Posted By snayper
Split string after 4000 char
Hi everybody!

I have a large comma separated text file. This file incluede some column which largest than 4000 character(this is not the last column). I tried with sed but i can't do it.

I...
2,920
Posted By snayper
thanks a lot! i use this: sed...
thanks a lot!

i use this:

sed 's/"[^"]*"//g' file | perl -nle 'print length'
2,920
Posted By snayper
sed remove everything between two string
Hi all,

I have this input:
"203324780",,"89321213261247090146","VfdsD150","0D","fd3221","V0343","aaa","Direkt","fsa","2015.02.27","39833,54454,21214",,,"fd","NORMAL","D","10fd","1243...
2,250
Posted By snayper
@vidyadhar85 Thanks Master!
@vidyadhar85

Thanks Master!
2,250
Posted By snayper
now i get this: looks like better :) ...
now i get this:

looks like better :)

0002012Mar282012Apr192012Aug162012Aug292012Oct012012Oct080Dec120Feb260Mar110Apr030Apr250Apr260Apr300May100May240May310May310May310Jun020Jun030Jun04

but...
2,250
Posted By snayper
@vidyadhar85 not work i get this: ...
@vidyadhar85

not work

i get this:
%d%s%02d
%d%s%02d 2012 Mar 28
%d%s%02d 2012 Apr 19
%d%s%02d 2012 Aug 16
%d%s%02d 2012 Aug 29
%d%s%02d 2012 Oct 1
%d%s%02d 2012 Oct 8
%d%s%02d 09:28 Dec...
2,250
Posted By snayper
sed convert date/replace
Hi,

I wold like to replace this 2012 Mar 02 to this 20120302.

i have already this code:

ls -lrt | awk '{ print $8$6$7 }'| sed -e s/[0-9]*:[0-9]*/'2013'/g
-e s/'Jan'/01/g -e s/'Feb'/02/g...
Showing results 1 to 18 of 18

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