I can type:dirname ~/home/blah/file.zipfor instance, and this works fine alone, but when I use this syntax as the parameter for some command it always reads 'dirname' as the desired directory. i.e.:cd dirname ~/home/blah/file.zipbash: cd: dirname: No such file or directoryBasically, how do I get 'dirname file' to be read as one entity?
Say I have a file's path, how do I reference that file's directory from the command line?
bash;directory
cd $(dirname ~/home/blah/file.zip)$( is a form of command substitution. The BashGuide Wiki has some good information about this process.