What is wrong with my shell scrip.
Nancy Rudins
nrudins at ncsa.uiuc.edu
Sun Jun 4 14:44:12 UTC 2006
On Fri, 2 Jun 2006, OOzy Pal wrote:
> I have not idea about shell scripting. I just googled and tried to
> write this two liner script but it does not work.
>
> What is wrong with it?
>
> #!/bin/sh
>
> myhome="home/oozy/System-Backup"
>
> cp ~/.bashrc ${myhome}/Config/bashrc
> cp /etc/hosts ${myhome}/Config/host
>
> When I do debug I get this error
>
> $ bash -v cpconfig
>
> #!/bin/sh
>
> myhome="home/oozy/System-Backup"
>
> cp ~/.bashrc ${myhome}/Config/bashrc
> cp: cannot create regular file
> `home/hab/oozy/System-Backup/Config/bashrc': No such file or directory
> .
>
No leading slash before home (/home/oozy/System-Backup).
Kind regards,
Nancy
Nancy Rudins nrudins at ncsa.uiuc.edu
http://www.ncsa.uiuc.edu/~nrudins/
Take a sad song and make it better. (lennon/mccartney)
More information about the ubuntu-users
mailing list