School of Physics, Mathematics, and Computing 
Not logged in (login)
help4407

This forum is provided to promote discussion amongst students enrolled in CITS4407 Open Source Tools and Scripting.

Before posting a question here, you might want to search the forum for previous posts asking the same question.
And please keep the discussion civil (as required by UWA's Computer Use Policy, #9).
 

Options:
RSS cloud
Jump to:

confusion for question in workshop4

3 of 108 articles shown, currently no other people reading this forum.
photo
From: Ao L.
Date: Thu 1st Apr 2021, 9:56pm
Actions: 
Login-to-reply

Dear prof,

Could you explain why option b: echo "*" is not correct? I tried in the terminal 
and it gave me the exact same answer as option c: echo '*'. Thank you for your 
time.

Regards
Ao

confusion for question in workshop4

photo
From: Ao L.  O.P.
Date: Thu 1st Apr 2021, 9:59pm
Actions: 
Login-to-reply

The question is:
Which of the following will print a single asterisk to the screen? Why?
a. echo *
b. echo "*"
c. echo '*'

confusion for question in workshop4

photo
From: Arran S.
Date: Thu 8th Apr 2021, 3:44pm
Actions: 
Login-to-reply

"Ao Li" <22*9*4*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> Dear prof,
> 
> Could you explain why option b: echo "*" is not correct? I tried in the terminal 
> and it gave me the exact same answer as option c: echo '*'. Thank you for your 
> time.
> 
> Regards
> Ao

Hi Ao -

Good on you for checking. Here is a question for you - suppose you were right, and echo 
"*" should indeed display an asterisk. How do you think we might work out what Bash is 
*supposed* to do in this situation - is there any other way you can think of aside from 
just typing the command in Bash to see what it does?

cheers

Arran
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  6:26am Aug 12 2021