0% found this document useful (0 votes)
870 views

Quiz Shell Scripting: I. Output Tracing (4 Items X 5 Points)

This document contains a quiz on shell scripting. It provides 4 bash scripts and asks the student to write the output of each script in 1-3 sentences. The scripts cover basic shell scripting concepts like comments, variables, string concatenation, arithmetic operations, and conditional statements. Correctly identifying the output of each script demonstrates an understanding of how to write and run simple shell scripts in bash.

Uploaded by

shadow demon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
870 views

Quiz Shell Scripting: I. Output Tracing (4 Items X 5 Points)

This document contains a quiz on shell scripting. It provides 4 bash scripts and asks the student to write the output of each script in 1-3 sentences. The scripts cover basic shell scripting concepts like comments, variables, string concatenation, arithmetic operations, and conditional statements. Correctly identifying the output of each script demonstrates an understanding of how to write and run simple shell scripts in bash.

Uploaded by

shadow demon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Quiz

Shell Scripting
I. Output tracing (4 items x 5 points)
Write the following output of each presented bash scripts

1. Output:

#!/bin/sh
# This is a comment! echo
“Aim high, STI!” echo
“This is a comment!” echo
This is a comment

2. Output:

#!/bin/sh
word1=Hello
word2=How
word3=you
word4=are
echo “$word2 $word4 $word2? $word1?!?”

3. Output:

#!/bin/sh
Name1=John
echo “Who are you?”
Name2=Michael
echo “Nice to meet you $Name1”

4. Output:

#!/bin/sh
aa=4
ab=5
ac=6
let “aa = aa + ac”
echo “The first operation is equal to $aa” let
“ac = ac - ab”
echo “The second operation is equal to $ac”

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy