Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

current file name in vi's colon mode

0 views
Skip to first unread message

Norbert Schellhammer

unread,
Jul 27, 1997, 3:00:00 AM7/27/97
to

hello, here comes, whatever happened to MWC, a user question,
is there an short name for the current file in the vi ?
After writing some lines in a shell script i say in colon mode
:! chmod +x sometimes_a_long_file_name
is there a handy substitution like (# or ! neither of them works)
for the name of the current file ? (an internal voice says: there is one)
another question: the find command ends with \;
I don't know another commands that ends so funny. It must have something
to do with the -exec or -ok thing and the shell who may not see the ;
and why are the expression primitives like -name -atime soooooooo long.
Norbert


Udo Munk

unread,
Jul 28, 1997, 3:00:00 AM7/28/97
to

Norbert Schellhammer (q230...@bonsai.fernuni-hagen.de) wrote:
: is there an short name for the current file in the vi ?
: After writing some lines in a shell script i say in colon mode
: :! chmod +x sometimes_a_long_file_name
: is there a handy substitution like (# or ! neither of them works)
: for the name of the current file ? (an internal voice says: there is one)

The special symbol for the current file is %.

: another question: the find command ends with \;

: I don't know another commands that ends so funny. It must have something
: to do with the -exec or -ok thing and the shell who may not see the ;

The command string for -exec and -ok must be followed by ;, that's just
the syntax of the find command. The \ is necessary to stop the shell
interpreting the ;, shell escapes are necessary all the time to protect
character with a special meaning for the shell, not only for find.

: and why are the expression primitives like -name -atime soooooooo long.

Now that you need to ask those who wrote the find command originally.
--
Udo Munk - http://www.umnet.de/
No working email address provided in newsgroups anymore, sorry for the
inconvenience. If you definitely have to email me please look it up on
the web page mentioned above.

0 new messages