Search Results

Search: Posts Made By: george_
2,474
Posted By george_
I am sorry,I didn't know about it...
I am sorry,I didn't know about it...
2,474
Posted By george_
what removed is going on???????? while read...
what removed is going on????????

while read LINE;
do
echo LINE |awk -v LIN="${LINE}" '{print...
2,474
Posted By george_
I did a mistake :( :( thanks for your...
I did a mistake :( :(

thanks for your reply :)
2,474
Posted By george_
whats wrong with this awk???
while read LINE;
do
echo |awk -v LIN="${LINE}" '{print substr(LIN,1,7)","substr(LIN,8,5)" ,"substr(LIN,14,10)","substr(LIN,24,6)" ,"substr(LIN,30,8)}';
done < exp1.txt


exp1.txt = 1234 ...
34,271
Posted By george_
any idea unix guys?? help me! ...
any idea unix guys??


help me!


thanks.
34,271
Posted By george_
>I assume you want to remove all the empty lines...
>I assume you want to remove all the empty lines in the files.

no!

I want in general,to use multiple sed commands,not just to delete empty lines.
34,271
Posted By george_
multiple sed commands
hello!
I have a few sed commands
sed '/^$/d' < $1 > tmp.t
sed '/^ \{3,\}/d' < tmp.t > tmp1.txt
.....
how can I write them in a single line?

sed '/^$/d' < $1 > | '/^ \{3,\}/d' < $1 > tmp1.txt...
11,263
Posted By george_
yes,I know...$0 and change...
yes,I know...$0 and change substr(...,...,...)....

but is ok ;)
11,263
Posted By george_
000000382019-0001-01john stewart ...
000000382019-0001-01john stewart 056628826 //..more fields
000000589219-0000-21joe warren //...more fields

should be :

0000003820,19-0001-01,john stewart ...
11,263
Posted By george_
<what I meant there is that if the no. of...
<what I meant there is that if the no. of characters excluding spaces is constant


including spaces is constant :)
11,263
Posted By george_
I get some strage results! awk -v...
I get some strage results!

awk -v LIN="${0}" '{print substr(LIN,1,6)","substr(LIN,7,5)" ,"substr(LIN,13,4)","substr(LIN,17,3)
" ,"substr(LIN,21,4)}' < file.txt > result.txt


why?
11,263
Posted By george_
thanks!!! it rocks ;) how I will use it...
thanks!!!
it rocks ;)

how I will use it like this:
instead of
echo |awk -v LIN="${LINE}"
to use plain $0
'{print substr($0,1,6)","substr($0,7,5)" ,"...

I guess the problem will be with...
11,263
Posted By george_
fields in a record which is lets say 30 chars...
fields in a record which is lets say 30 chars another is 40 may contain spaces...
11,263
Posted By george_
it doesn't solve the problem... in each file...
it doesn't solve the problem...

in each file I have to change
substr parameters
instead of substr($1,7,11)" ,"substr($2,1,4)","substr($2,5,7)"

I want...
11,263
Posted By george_
thanks a lot! is there a more generic way to...
thanks a lot!

is there a more generic way to do it?
instead of $1/$2....to parse the whole line?
becouse like this I will have to change the script each time I use it for another file.

thanks...
11,263
Posted By george_
fixed record length
hello!

I have a file with fixed record length...

format:

123445asdfg 4343777 sfgg

I wanna convert it to

123445,asdfg ,4343,777 ,sfgg

is there any way to do it?

sed/grep/awk??
...
Showing results 1 to 16 of 16

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