Skip to content

Instantly share code, notes, and snippets.

@MousaHalaseh
Created November 21, 2023 12:36
Show Gist options
  • Save MousaHalaseh/47a4d51f08d8bcc58fbc5353fa89fd28 to your computer and use it in GitHub Desktop.
Save MousaHalaseh/47a4d51f08d8bcc58fbc5353fa89fd28 to your computer and use it in GitHub Desktop.
up function
function up(){
if [[ $1 != "" ]] && [[ $1 -lt 1 ]] ; then echo "Argument must be a positive integer."; fi
for n in $(seq 1 $1); do dots+="../"; done
cd $dots
n=""
dots=""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment