pythonbeginer pythonbeginer - 1 year ago 55
Bash Question

creating a folder one level above the present location

I need to create a simple shell script to create a folder one level above the present location of the script. I was successful in getting the present location with:

#!/bin/sh
pwd


However, I got stuck how to go one level up to create a folder, suggestions would be helpful.

Answer Source

Use .. in your path to go up a directory:

#!/bin/sh
mkdir ./../foldername