M
mauro papandrea
Given this simple file:
cat t1
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
with
perl -ne 'print if /Tuesday/ .. /Friday/;' t1
I can get:
Tuesday
Wednesday
Thursday
Friday
Is there a simple way to modify the range selection in order to get all
the lines but the last in the range?
Namely, getting this output:
Tuesday
Wednesday
Thursday
An idea could be to push back last line but I do not know how to do that.
Thank you
Regards
Mauro
PS this is an oversimplified case for the sake of simplicity
cat t1
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
with
perl -ne 'print if /Tuesday/ .. /Friday/;' t1
I can get:
Tuesday
Wednesday
Thursday
Friday
Is there a simple way to modify the range selection in order to get all
the lines but the last in the range?
Namely, getting this output:
Tuesday
Wednesday
Thursday
An idea could be to push back last line but I do not know how to do that.
Thank you
Regards
Mauro
PS this is an oversimplified case for the sake of simplicity