I have a small problem: the following code does not
do what I think it should.
echo "12 115" | awk ' {
all = $ARGV[1]
split(all, new_all, " "
SR = new_all[1]
ER = new_all[2]
while((getline buf < "README" > 0) {
for (x=buf ;x <= NR ; x++)
Here is where I get stuck.
What I want to be able to do is read the text between
SR and ER.
There must be a better way.
I know sed -n '12 , 115'p would do better but I have
forgotten how to get shell vars(that is what the two values
represent) into a sed expression???
Thanks
do what I think it should.
echo "12 115" | awk ' {
all = $ARGV[1]
split(all, new_all, " "
SR = new_all[1]
ER = new_all[2]
while((getline buf < "README" > 0) {
for (x=buf ;x <= NR ; x++)
Here is where I get stuck.
What I want to be able to do is read the text between
SR and ER.
There must be a better way.
I know sed -n '12 , 115'p would do better but I have
forgotten how to get shell vars(that is what the two values
represent) into a sed expression???
Thanks