The trouble is when I run ./VBoxLinuxA... I'm getting:
Unable to determine your Linux distribution
so there is build in script :
check_system_type() {
if [ !
Hi,
I have to assign a value for a varaiable based on a Input.
the program I had looks like this:
def wordToNumber(word):
if word == "one":
return 1
elif word == "two":
return 2
elif word == "three":
return 3
elif word == "four":
return 4
elif word == "five":
return 5
elif word == "six":
return 6
I'm using sh (dash) on Ubuntu (lucid) and the manpage has this to say about -e:
-e errexit If not interactive, exit immediately if any untested command fails.
The exit status of a command is considered to be explicitly tested
if the command is used to control an if, elif, while, or until; or
if t
Hi there, new to this forum and I recently encounter this problem:
I tried to use if-elif loop in a while-read loop, something like this:
Code:
#!/bin/bash
while read myline1 myline2
do
if [ '$myline1 > '$myline2' ]; then
echo "Successful!"
elif [ '$myline1 < '$myline2' ]; then
echo "Failed"
fi
done < $1
Input file looks like this:
Code:
200 1
Hello, I'm writing simple script to automate splitting and tagging audio files.Here's the code:#!/bin/bash
cuefile=$1
extension=${cuefile##*.}
basename=${cuefile%.*}
if [[ $# -eq 1 ]] && [[ $extension = "cue" ]]; then
if [ -e "$basename.flac" ]; then
type="flac"
elif [ -e "$basename.ape" ]; then
type="ape"
Hi i have a function which fetches the field value which can have one value out of total four values from database on the base of which i need to display some data according to value
update_grp = User_Groups.objects.get(user_id=request.user.id)
showopen = update_grp.profilegroup
if showopen == "trendy":
slidercategory = Category.objects.get(id = 65)
elif showopen == "Classic":
while writing a script m not able to convert string into a number therefore it is not picking the write if condition
pls help
Code:
#!/bin/sh
echo "this game is about selecting number and getting lucky"
echo " the number are 1 2 3 4 5 and 0 to exit"
read $a1
if [ "$a1" = 1 ]; then
echo "NUMBER IS NOT CO
Hello,
I try to use shell bookmarks with DirB.
It is a script file with a list of function.
Need to be sourced in .bashrc.
But, when i sourced the file, errors rised !
can try it?
Do you have this problem?
any idea?
The file join to this post.
bash: .bashDirB: line 117: syntax error near unexpected token `elif'
'ash: .bashDirB: line 117: ` elif [ "$1" == "-"