YASS (yet another shell script)
Raymund Galvin
raymund at sci.UUCP
Sun Mar 16 06:51:01 AEST 1986
In article <620 at ssc-vax.UUCP>, aims at ssc-vax.UUCP (John Daley) writes:
> This is a 'simple' little shell script I whipped up, out of need, to
> print a specific line of a specific file. Yes, I chose to use the B
> shell, but it gets the job done, right?.
>
> Why am I posting such a meager little script? This newsgroup hasn't
> been very active lately (excluding discussions). Anybody out there
> got a better way to do what my script does?
^^^^^^
Better? I dont know. I dont have access to B shell.
The following alias will print any single line from a text file:
alias line 'awk NR==\!:1 \!:2-$'
Example: "line 10 .login" would print the tenth line from .login
The following alias will print a range of lines from a text file:
alias list 'awk NR==\!:1,NR==\!:2\{print\ NR\":\"\$0\} \!:3-$'
Example: "list 9 11 .login" would print lines 9 - 11 from .login
More information about the Comp.sources.bugs
mailing list