PLEASE NOTE: the upgrades to this server,, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49


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

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 564 articles.
Currently 3 other people reading this forum.

 UWA week 12 (1st semester, week 4) ↓
SVG not supported

Login to reply

9:48am Fri 25th Mar, Ryan B.

"Peter Millitz" [email protected] wrote:

Hi Peter,

RE: Lecture 6 slide 9

I made the assumption that [[ ]] uses the same flags as test (BTW, how do you look up [[ ]] in the man pages???) and tried the following:

To look up [ ] in the man page, you can type man test in the terminal. [ ] is simply alternative syntax for test, whereas [[ ]] is actually reserved (new) syntax within bash (and other shells).

book= test -f $book echo $? 0 [[ -f $book ]] echo $? 1

Anyone have any idea why the exit status is different?

The following articles describe some of the differences between the different test constructs and why they may return different errors/responses.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy