LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Misc Questions (https://www.linuxquestions.org/questions/linux-general-1/misc-questions-37691/)

OlRoy 12-08-2002 08:08 PM

Misc Questions
 
I need your help. I don't even understand the first two questions and have looked for a hour for the last two. The last one i even tried doing it and nothing happend. These are questions off the study guide for the final so its not going to be graded, i just need to know the answers.


20. Your script has just executed the grep command and returned an error message. What would the output of the following commands in the same script be?

if [ *$?* = 0]

then

echo zero

else

echo one

fi

A. Zero
B. One
C. No Output
D. An error message

48. Which command displays the value of the variable FILE?

A. echo ~FILE
B. echo FILE
C. echo $FILE
D. echo #FILE


54. Which quoting mechanism displays all characters literally and allows for variable expansion?

A. "" (double quotes)
B. '' (single quotes)
C. ``(back quotes)
D. \ (backslash)


56. You intended to type the command rm 'test' but accidentally inserted a space and tyed rm ' test'. What is the result?

A. All files in your current directory containing 'test' will be deleted
B. All files in your current directory will be deleted and all files startring with 'test' in subdirectories will be deleted
C. All files in your current directory containing will be deleted and all files in the subdirectory test will be deleted
D. All files in your current directory will be deleted

trickykid 12-08-2002 08:25 PM

Well, we don't really much like doing peoples homework/study answers to them. This is something you should really be able to do on your own. There are tons of resources available.

Half_Elf 12-09-2002 05:37 PM

this look like a very basic university homework. Come on.

DavidPhillips 12-09-2002 06:03 PM

I suppose you have a linux box that runs

I think the thing to do would be to simply try each one and see the outcome. This way you will learn it.


All times are GMT -5. The time now is 02:54 AM.