السلام عليكم ورحمة الله وبركاته
محتاااااااااجه مساعده ضروريه في البرمجه حق السكريبت شل لنظام لينكس
الله يسعدكم
بحكم دخولي على دا المنتدى دايما اشوف الأعضاء ماشاء الله خبرتهم عاليه
فأحتاج أحد يساعدني ضرووووووووووووري إختباري الفاينال حق المعمل الإثنين هذا بإذن الله والواجب تسليمو الأحد
حأكتب السؤال والأكواد هنا واحتاج أحد ضروري يصححلي ياها
لأنو حأذاكر منها إن شاء الله
الله يسعدكم دنيا وآخره يا أهل الخبره ردو عليا
بسم الله الرحمن الرحيم
دا السؤال
Create a file ‘Assignment‘ on the HOME directory and write a shell script do the following (based on the user choice) :
Choice 1: Check if a file exists in a specific directory. If the file exists display its content and check if the user is allowed to execute it, permit the user to execute the file, if he is not allowed. fie
# Display a menu of options and
# depending upon the user's choice,
#execute associated command
#Display the options to the users
If the file does not exist, display the file is not found and ask the user to reenter the name of the file and directory. Stop asking when the user enter “done” as a file name.
Choice 2: Read n numbers from the user, calculate how many even or odd numbers entered then display the results.
ودا جواب الإختيار الأول إلي هوا رقم واحد
echo
read choice
case $choice in
1) until echo
read fil_name && read dir_name
do
if [ $fil_name=done ];
then break
elif
[ -f ~/$dir_name/$fil_name ];
then cat ~/$dir_name/$fil_name && test -x ~/$dir_name/$fil_name && echo $?
if [test ! -x ];
then
chmod u+x $fil_name
fi
fi
fi
done
;;
2) epxr 1 + 2;;
*) wrong;;
esac
.
بيطلعلي غلط في إنتهاء الإف
اتمنى أحد يعمل تريس للبرنامج ويشوف إش المشكله لأاني أحس إنها من الجهاز ولا مو عارفه أنا كاتبه الكود غلط ولا صح
ودي إجابة السؤال التاني
echo -n "Enter a number: ”
read n
rem=$n % 2
if [ $rem -eq 0 ]
then
echo “$n is even"
else
echo “&n is odd”
fi
دا عاد مو عارفه إش السبب
يطلعلي غلط في الإلس
بلييييييييييييييز بلييييييييز أحد يرد عليا لاتدخلو على الموضوع من دون رد لأني بجد محتاجه مساعده عاجله
ومشكوره مقدما