Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing commands to vi during call

Status
Not open for further replies.

hubud

Instructor
Oct 18, 2002
123
GB
I have a command alias:
alias lf='vi `ls -rt | tail -1`'

that I use to open up the last run file in a session log directory. 99% of the time I only want to see the last line of it. Is it possible to pass the ":$" command to vi when you open it so it opens down at the bottom straight away.

????

cheers

simmo
 
Have you tried this ?
alias lf='vi +G `ls -rt | tail -1`'
Anyway, man vi

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top