Possible duplicate: Bash tool to get nth line from a file
I need to select the nth line a file, this line is defined be the variable PBS_ARRAYID
The accept solution in the another question (link above) is:
sed 'NUMq;d' job_params
I'm trying to adapt for the variable like (actually I try lots of stuff, but is the one that makes more sense):
sed "${PBS_ARRAYID}q;d" job_params
But I get the following error:
sed: -e expression #1, char 2: invalid usage of line address 0
What am I doing wrong?