• 0
  • مالي خلق
  • أتهاوش
  • متضايق
  • مريض
  • مستانس
  • مستغرب
  • مشتط
  • أسولف
  • مغرم
  • معصب
  • منحرج
  • آكل
  • ابكي
  • ارقص
  • اصلي
  • استهبل
  • اضحك
  • اضحك  2
  • تعجبني
  • بضبطلك
  • رايق
  • زعلان
  • عبقري
  • نايم
  • طبيعي
  • كشخة
  • النتائج 1 إلى 3 من 3

    الموضوع: ارجو المساعدة بالسرعة القصوى

    1. #1
      التسجيل
      08-02-2009
      المشاركات
      3
      المواضيع
      2
      شكر / اعجاب مشاركة

      ارجو المساعدة بالسرعة القصوى

      ارجو المساعدة بحل مشكلة السكريبت التالي
      Write a script (execadd.sh) that will take a single filename as an argument and adds execute permission to the file for the user, but only if the file is a regular file.
      Your script must check to see that there is exactly one argument. If there are no arguments or more than one arguments, your script must produce a "usage" message that tells how to use the script.
      Here is the result of running the script several times, with extra
      blank lines to make things more readable.
      linux199@linux:~> touch file1
      linux199@linux:~> mkdir dir1
      linux199@linux:~> ./addexec.sh
      Usage: ./addexec.sh filename
      linux199@linux:~> ./addexec.sh file1 file2
      Usage: ./addexec.sh filename
      linux199@linux:~> ./addexec.sh dir1
      dir1 is not a regular file.
      linux199@linux:~> ./addexec.sh nosuchfile
      nosuchfile does not exist.
      linux199@linux:~> ls -l file1
      -rw-r--r-- 1 linux199 users 0 2006-11-21 17:38 file1
      linux199@linux:~> ./addexec.sh file1
      linux199@linux:~> ls -l file1
      -rwxr--r-- 1 linux199 users 0 2006-11-21 17:38 file1

      هذه محاولتي بحل هذا السكريبت ولكنه لايعمل ارجو منكم المساعدة
      !/bin/sh
      If [$# -ne 1] # check if number of argument is not equal to 1
      Then
      Echo “Usage: $0 filename” # giving a Usage Message
      Elif [$# == 1] # check if number of argument is equal to 1
      Then
      If $1 –f # checking if file is existed
      Then
      chmod 775 $1
      # Adding execute permission to make file readable and executable by others, but only changeable by the issuing user.
      Else
      Echo “file isn’t a regular file”
      Fi
      Else
      Echo “error: file does not exist” # giving a Error Message
      Exit 0
      Fi

    2. #2
      التسجيل
      08-02-2009
      المشاركات
      3
      المواضيع
      2
      شكر / اعجاب مشاركة

      رد: ارجو المساعدة بالسرعة القصوى

      ارجو المساعدة باصلاح السكريبت فانا عجزت عن ذلك ومحتار

    3. #3
      Argonaut غير متصل عضو مميز
      نايم
       
      التسجيل
      03-08-2004
      الدولة
      تركيا
      المشاركات
      3,755
      المواضيع
      524
      شكر / اعجاب مشاركة

      رد: ارجو المساعدة بالسرعة القصوى

      السلام عليكم
      كان ودي اساعدك لكني ما اعرف

    ضوابط المشاركة

    • لا تستطيع إضافة مواضيع جديدة
    • لا تستطيع الرد على المواضيع
    • لا تستطيع إرفاق ملفات
    • لا تستطيع تعديل مشاركاتك
    •