Search Results

Search: Posts Made By: f_o_555
3,166
Posted By f_o_555
this is the code #!/bin/bash TOT=`wc -l <...
this is the code

#!/bin/bash
TOT=`wc -l < $1`
PART=$(($TOT / 16))
echo $1 $TOT $PART

echo "FAKE 1" > xxx
echo "FAKE 1" >> xxx
echo "FAKE 1" >> xxx

for (( j=0;j<$PART;j++)); do
for...
3,166
Posted By f_o_555
thank you very much. the solution read...
thank you very much.

the solution

read var1 var2 junk << !
$(sed -n '2p' file1)
!

it works fine alone
I have it in a for loop and I get the error

line 54: syntax error: unexpected end...
3,166
Posted By f_o_555
sed to read
Hi all,
is it possible to pipe the output of sed to read?
I'm using bash I tried

sed -n '2p' file.dat | read var1 var2
echo $var1 $var2


without success

sed -n '2p' file.dat

gives
...
Showing results 1 to 3 of 3

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