During our day-to-day work, we end up all files with same extension. So, if we want to output the last few lines of similar type of files, we can follow the following approach.
for xvg in *.xvg; do echo $xvg;cat $xvg|tail -2 $xvg; done
By default, tail outputs last 10 lines, so we cannot use:
tail *.xvg
If we want the look at the 2 lines instead of 10, we can use the above one-liners.
Comments
Post a Comment