I have a script that generates a variable with the location of a file and its complete path. What i want to do is to "cd" to the directory where that file is located using the path name of the file. GIS has absolutely failed me.
For example when i run my script it generates a variable called $f. When i cat it i get.
/Users/myuser/Documents/MemSVC_5493/MemSVC.html
No i want to cd to the directory:
/Users/myuser/Documents/MemSVC_5493/
How can i do this?
What i really want to do is grep stuff in that file and then create a file with the name of the current directory.