Quote:
|
Originally Posted by napolayan
Code:
#!/bin/awk -f~
cat bc|while read line
do
x=`wc -l bc|awk '{print $1}'`
for ( k=( NR + 1 ) ; k<=x ; k++ )
{
if /$line/
then
sed 'k d' bc
fi
}
done
|
You are defining the script as awk, but there is non-awk code in the script. Use #!/bin/sh or #!/bin/ksh or #!/bin/bash (depending on your shell).