diff --git a/ex1/T2.sh b/ex1/T2.sh old mode 100644 new mode 100755 index ba1d888c7f9a4c36b0c3709586ea96fea6a080c3..8f44c793a6f320108cfba1392fd789421ed9f24e --- a/ex1/T2.sh +++ b/ex1/T2.sh @@ -1,7 +1,7 @@ -#!/bin/bash/ +#!/bin/bash #the following command returns the number of arguments #hint $? will be 0 if there are no errors after any bash command - + args=$# if [ $args -lt 2 ] then @@ -10,4 +10,15 @@ then fi folder_path=$1 link=$2 -#your implementation goes here + +mkdir $folder_path +if [ $? -eq 1 ] +then + exit +fi + +ln -s $folder_path $link +if [ $? -eq 1 ] +then + exit +fi