What is wrong with my shell scrip.

Dr. Pascal Hos pascalhos at gmail.com
Fri Jun 2 13:07:29 UTC 2006


You are missing a backslash before home

myhome="/home/oozy/System-Backup"

On 6/2/06, OOzy Pal <oozypal at gmail.com> 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
> .
> .
> .
>
> --
> OOzy
> Kubuntu-Dapper
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060602/b7a157bd/attachment.html>


More information about the ubuntu-users mailing list