Sponsored Content
Full Discussion: Quiz help!
Top Forums UNIX for Beginners Questions & Answers Quiz help! Post 302966363 by julianpeters on Thursday 11th of February 2016 06:52:50 AM
Old 02-11-2016
Question Quiz help!

Hello, I'm new to Unix and need help answering these questions if possible, thanks.
---------------------------------------------------------------------------------------
In a shell script, which command could be place at the end of a command line to combine stderr and stdout into the stdout stream for further manipulation?
2>>1&
2>&1
&1>2
None of the above
-------------------------------------------------------------------------------------
What is the correct syntax to copy the file /home/newton/scripts/logger.ksh to the directory /testing/scripts/
assuming you are currently in neither of these directories?
cp /home/newton/scripts/logger.ksh /testing/scripts
cp /home/scripts/logger.ksh /testing/scripts/logger.ksh
mv /home/newton/scripts/logger.ksh /testing/scripts
mv home/newton/scripts/logger.ksh /testing/scripts
--------------------------------------------------------------------------------------
Run the following UNIX command:
echo "x">a; echo "y">>a; tail -1 a
Choose the correct output from the answers below
1. x
2. y
3. x
y
4. xy
---------------------------------------------------------------------------------------
Run the following UNIX command:
echo "x">a; echo "y">>a; sort -r a
Choose the correct output from the answers below
1. x
2. y
3. x
y
4. xy
---------------------------------------------------------------------------------------
Which unix shell command displays the contents of the abc.txt file to standard output interactively (stopping after each page of output)?
abc.txt
cat abc.txt
edit abc.txt
more abc.txt
---------------------------------------------------------------------------------------
Which shell command sequence can be used to transfer files to a remote server from the local directory?
1) ftp
2) mv
3) put
4) wget
---------------------------------------------------------------------------------------
a1
b1
c1
Which of the following UNIX shell command sequences produces the output "c1" (list all the apply):
a) grep "1" abc.txt
b) grep "c" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c2"
e) cat abc.txt > grep "c"

1. b) grep "c" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c2"
2. a) grep "1" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c2"
3. b) grep "c" abc.txt
c) grep "c1" abc.txt
e) cat abc.txt > grep "c"
4. c) grep "c1" abc.txt
d) cat abc.txt | grep "c2"
---------------------------------------------------------------------------------------
Which UNIX shell command displays the lines of the abc.txt file that match the string XYZ?
1) find XYZ abc.txt
2) find -XYZ abc.txt
3) grep -XYZ abc.txt
4) grep XYZ abc.txt
---------------------------------------------------------------------------------------
a1
b1
c1
Which of the following UNIX shell command sequences produces the output "c1" (list all the apply):
a) grep "1" abc.txt
b) grep "c" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c"
e) cat abc.txt > grep "c"

1. b) grep "c" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c"
2. a) grep "1" abc.txt
c) grep "c1" abc.txt
d) cat abc.txt | grep "c"
3. b) grep "c" abc.txt
c) grep "c1" abc.txt
e) cat abc.txt > grep "c"
4. c) grep "c1" abc.txt
d) cat abc.txt | grep "c"
---------------------------------------------------------------------------------------
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Question for school quiz

I have these questions for my unix class that I can't figure out because I missed a couple of days. They are for a quiz we took last week so by answering the questions you are not bettering my grade or doing my homework. I just want to understand was the answers. My teacher is really bad at... (1 Reply)
Discussion started by: djeung
1 Replies

2. Programming

C Programming Quiz

Hey check this out..it's only a 10 question quiz..but it's brain storming. http://mulogic.phpnet.us/drupal I scored 7/10 (3 Replies)
Discussion started by: luv2beuniq
3 Replies

3. Shell Programming and Scripting

AWK quiz

How come every post in this forum is a request for help? How about some fun? What does the following command do? nawk -F'+' ' {i=NF;for(;i;i--)if($i)w++} END{ for(k in w){c=w;x=xk",";if(c>m)m=c} for(;m;m--)if(m in x)print m,x } ' <(man nawk) (2 Replies)
Discussion started by: colemar
2 Replies

4. AIX

HACMP pop quiz

Hi all, A pop quiz is being organized in my project and I've been appointed as one of the quiz-masters. This is a sample of what we are bringing forth. Feedback is welcome. 1)Name 2 commands used to display cluster state, but doesn't use the clinfoES daemon: a) ... (0 Replies)
Discussion started by: themetalingus
0 Replies
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy