|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
vi command
Hi, I want to create an alias named vi that runs the command /usr/ucb/vi to edit text files;the alias should turn off the notification of new emails using the biff cmd before executing the vi cmd and turn biff back on after the vi cmd.
What I found on vi cmd in man is /usr/bin/vi ....[+command |-command]filename...What is this "ucb"? I came up with sth like this: alias vi ' /usr/ucb/vi +biff n | -biff y ' vi filename Is this anywhere close to what I need? Thanks in advance P.S. To guggach - THANKS. |
|
#2
|
|||
|
|||
|
ucb = University of California, Berkeley, an unix pionier (bsd)
dont use 'ucb' commands (they still are on the sys for compatibily reasons), prefere /bin and /usr/bin never give to aliases the name of a legal cmd never do this alias vi 'blah blah' alias ls 'ls more options' alias cd 'cd NEWDIR; ls;pwd' # a very worst one use own names alias myvi 'blah blah' suppose you type (on cmd line) cd /olddir; tar cf - . ¦( cd /newdir; tar xfvp -) which cd will be used ? the second will probably cause a core-dump ![]() you can concatenate cmds in alias alias mycmd 'cmd1 ; cmd2 ; cmd3 ; and so on' pay more attention reading man pages, that cmd in vi +cmd filename is an editor command of vi, the notation ¦ -c cmd means +cmd AND -c cmd are equivalent finally, aliases can be very confusing and dangerous, because a lot of people does not realize, they are NOT using a cmd but an alias, the output can be essentially different ... and when piped to other cmds ![]() ![]()
__________________
working on Solaris[5-9], preferred languages french and C. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > vi command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|