Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bash script - basic questions for simple script

Programming languages, Coding, Executables, Package Creation, and Scripting.
Message
Author
HarborView
Posts: 41
Joined: 2014-02-01 02:21
Location: The Space Coast of the USA

Re: Bash script - basic questions for simple script

#21 Post by HarborView »

The problem is not in the case syntax. No need to cite POSIX.

The problem is make_avalaible() and make_unavailable().
Parentheses are not permitted when calling a function. For instance this script produces syntax errors:

Code: Select all

#!/bin/bash
Func1 () {
  echo "Heck, yeah"
}
Func2 () {
  echo "Watch your language.  This is a family forum."
}

echo "======================================="
echo "Let's try a function or 2."
Func1()
Func2()
This script produces the expected output:

Code: Select all

#!/bin/bash
Func1 () {
  echo "Heck, yeah"
}
Func2 () {
  echo "Watch your language.  This is a family forum."
}

echo "======================================="
echo "Let's try a function or 2."
Func1
Func2

Post Reply