lineget.py
See complementary routine colget.py.

Pull a line of data from an ASCII file. The file must have a "# data" line that delineates the header.

 

/home/sco/sco/codes/python/tables/lineget.py 
% lineget.py --help 
usage: lineget.py [-h] [-v] arg1 arg2

positional arguments:
  arg1           Input table-style file
  arg2           line number (after #data) to be extracted

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Verbose responses

% cat file.1
Here is a header line 
# data
1
2 
This is my line 3
4
ghhg 

% lineget.py file.1 3
This is my line 3

 




Back to scocodes page