Re: Stupid spaces

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

 



calin said:
>
> Hello all.
>
> file_path='"/some/where/Test Folder/"'
> echo "$file_path"
> cd "$file_path"
>
> But surprise: it didn't. Every time I try to run it it gives me
> something like:
>
>
> $ ./cding.sh
> "/some/where/Test Folder/"
> ./cding.sh: line 5: cd: "/some/where/Test Folder/": No such file or
> directory
> $
>
> although the Test Folder exist, is in the right path (/some/where/Test
> Folder) and it's permissions are 777.

It's not lying to you.  The directory "/some/where/Test Folder/" doesn't
exist, but I bet /some/where/Test Folder/ does.  Remove all ' and " from
your script and watch it work.

Enjoy.

-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux