bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nohup doesn't accept aliases . .


From: Bob Proulx
Subject: Re: nohup doesn't accept aliases . .
Date: Fri, 14 Jun 2002 01:30:51 -0600
User-agent: Mutt/1.3.28i

> Hey, I was just trying to use nohup this way:
>  
> nohup cvsbackupthebackup 
>  
> where cvsbackupthebackup is just an alias - it looks like it does not
> correclty interpret the alias (it's an rsync command) -
>  
> I'd like to nohup and & my command so I can backup cvs, and logout and
> go home while it's working!

Unfortunately the shell only expands aliases when they are in the
command position.  The shell does not expand aliases when they are
passed as arguments to other commands.

Suggestion:  Instead of using an alias create a shell script.

File cvsbackupthebackup:

  #!/bin/sh
  rsync etc. etc. etc.

Make it executable.

  chmod a+x cvsbackupthebackup

Then since it is a real command and not an alias it does not need to
be expanded.  That will work as you want it to.

By the way...  Expanding aliases or not is not something that the
'nohup' command can do anything about.  It is a shell feature.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]