I need to know how to get the 3rd - 5th character in this situation:
Code:
[103050_rx30@rx30 ~]$ set - `cat deaopts.cnf`
[103050_rx30@rx30 ~]$ echo $1
NDXX0000147
I am trying to generate a variable from the above file for archiving reasons. the basic file name will be the 3rd - 5th character of echo $1. The first two chars are meaningless for the file name, but do represent other bits of info that I don't need.
I'm sure there is some kind of awk or sed command that I can use to grab those characters, but sadly I just dont know enough yet to figure that out.
Thanks in advance for the help.