Stop learning alone!

Learn faster and stay on-track by joining this free class with other self-learners.

Register for Bash Scripting now.

Bash Scripting

Class length: 18 weeks. Start anytime.

Creator: kday

Status: Established

Join this class!

Lesson 9: Assignment 1

Read chapter 10 and do the examples.

Homework Submissions

1 total

kday (Self-grade: Pretty good)
Submitted 1 year ago | Permalink | Time spent: 20 minutes

I got functions to work in section 10.4, but the function that they have defined produced an error for me. I'm not sure if I was misusing it, but below is what I got when I tried to run the 'usage' function.

Also, I was surprised to learn that bash functions can't explicitly return a value. They just set values to variables that can be access by the code the calls the function, or they can output text that can be parsed. Seems kind of annoying to do things that way.

# Error from section 10.4
line 3: syntax error near unexpected token `&'