Sun Certified Solaris 9.0 System and Network Administrator AllinOne Exam Guide [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Sun Certified Solaris 9.0 System and Network Administrator AllinOne Exam Guide [Electronic resources] - نسخه متنی

Paul Watters

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید








Summary



In this chapter, we examined how to create shell initialization scripts, by examining how to set environment variables and execute commonly used script commands. In addition, we reviewed some basic shell script patterns, which can be used within .profile (and other shell scripts) to perform a wide variety of repetitive actions.



Questions




































1.




What is the name of the Bourne shell initialization script?





  1. .cshrc





  2. .login





  3. .profile





  4. .init










2.




What is the name of the site-wide skeleton file for the Bourne shell initialization file?





  1. /etc/skel/local.cshrc





  2. /etc/skel/local.login





  3. /etc/skel/local.profile





  4. /etc/skel/local.init










3.




What command would be used to set the value of the environment variable TERM to be vt220?”





  1. TERM=vt220





  2. TERM=‘vt220’





  3. TERM=vt220





  4. setenv TERM=‘vt220’










4.




What escape string is used to print an ASCII beep character in a shell prompt?





  1. \a





  2. \d





  3. \h





  4. \H










5.




What escape string is used to print a date string in a shell prompt?





  1. \a





  2. \d





  3. \h





  4. \H










6.




What escape string is used to print the full hostname in a shell prompt?





  1. \a





  2. \d





  3. \h





  4. \H










7.




What escape string is used to print a short hostname in a shell prompt?





  1. \a





  2. \d





  3. \h





  4. \H










8.




What command is used to source another shell script while maintaining all environment settings?





  1. source





  2. sh





  3. .





  4. ./










9.




What command would be used to display the string “Status OK” while .profile was being executed during shell initialization?





  1. println "Status OK"





  2. printf "Status OK"





  3. echo "Status OK"





  4. cat "Status OK" >> /dev/null










10.




What parameter is used with the test command to determine whether a file is a special block file?





  1. -b





  2. -block





  3. -blockfile





  4. -bf










Answers



































1.




C. The name of the Bourne shell initialization script is .profile.




2.




C. The name of the site-wide skeleton file for the Bourne shell initialization file is /etc/skel/local.profile.




3.




A. TERM=vt220 will set the environment variable for the terminal type to vt220.




4.




A. The ASCII beep character is \a.




5.




B. The date string is represented by \d.




6.




D. The shell prompt is set by \H.




7.




C. The short hostname is represented by \h.




8.




C. The source command is “.".




9.




C. The command echo "Status OK" will display the "Status OK" string.




10.




A. The –b option is used to test for special block files.









/ 265