Am i doing something wrong?
This loop doesn't seem to work.
#!/usr/bin/ksh
num=3
for i in $(seq 1 "$num")
do
awk 'NR==$i' "$file1" > "$file2"
# Doing some operation
done
I want 3 awk to be executed:
awk 'NR==1' "$file1" > "$file2"
# do some operation
awk 'NR==2' "$file1" > "$file2"
# do some operation
awk 'NR==3' "$file1" > "$file2"
# do some operation