I frequently have to cd
from $HOME
to a particular long directory path. So I thought I'd put a cdscript in $HOME to make getting there a little quicker.
cdscript:
#!/bin/sh
directory="/some/big/long directory path/that/I/use/frequently"
cd "$directory"
Set permissions:
chmod 700 cdscript
./cdscript
doesn't do anything. What am I missing? (Yes, those spaces in the path exist, and I can copy and paste the exact individual lines in the shell with success, so the path exists too). Also, is it more Unixey to just make a symbolic link to the directory instead of the above script, and cd
to the link instead?
-x
at the first line:#!/bin/sh -x
and runt it again. It starts debug mode, and you can see what it's really running. – Albert Dec 23 '14 at 12:44