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
Also, there are better alternatives then "bash" , some people believe that bash stands for "broken again shell" with despicable security record.
That's subjective. Bash is the most popular, and can be used to most scripting needs.
I'd suggest also learning some general programming language later, I would recommend python.
I do 'mixing', call bash scripts from python programs, python programs from bash scripts. Also sed and awk in some programs. Each language has it's own strenghts.
I started with C when I started my (late) graduation! I know the basics of C.
I have also self-taught Python but had to quit due to school. Not enough time for both. I'm a day worker (full-time) and also a full-time parent. So, no much spare time left!
L_V wrote:@PsySc0rpi0n
I think the priority is to 100% clarify in your mind what you want to achieve before looking for a solution (which is not unique).
You can investigate this for test purpose:
MOUNT="loop0"
df|awk '{print $1" is mounted on " $6 " !";}'|grep $MOUNT||echo -e "\033[1;31m$MOUNT is not mounted !"
I think you are correct! I previously said I wanted to check if a filesystem was mounted but in fact, it was rather if a file has been successfully attached to loop0 or not. By terminal command this is done using "sudo losteup /dev/loop0 file.ext". What I want was to check if this command was successful or not. For that I ended up using the return value of the command itself.
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:
#!/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()
#!/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