10-23-2013
In addition to what RudiC said, comments can't be used as selections in a case statement.
Your 1st if statement syntax looks OK (except that the if in the then clause is missing both then and fi. All of your other if statements are also missing required bits of the grammar of if statements.
In addition to what Corona688 said, saying that you're getting syntax errors and showing us those syntax errors are two VERY different things. If you want our help, you are much more likely to get it if you help us help you. Show us exactly the diagnostic messages you're getting instead of leaving it to our imaginations.
Since there are so many syntax errors in this relatively short script; try just putting an if statement (and the variable assignments needed to make it work) in a file and debug that script until you figure out how if statements work. Then do the same thing with a case statement. For both if and case statements, print the bash man page on your system and look closely at the syntax for if statements and for case statements. If you have trouble figuring out how to make if statements work or how to make case statements work, we'll be glad to help; but don't expect us to do your homework for you.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am new to linux and also also to shell scripting.
I have one shell script which unpacks .tgz file and install software on machine.
When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies
2. Linux
I am trying to replace the value of $f3 but its not working . I don't know what I am missing here .
cat dim_copy.20080516.sql | grep -i "create view" | grep -v OPSDM002 | while read f1 f2 f3 f4 f5 f6 f7 f8 f9
do
echo " $f3 "
sed -e... (13 Replies)
Discussion started by: capri_drm
13 Replies
3. Shell Programming and Scripting
KDE's Kontact PIM breaks quoted-printable vcard files because it
linebreaks in the middle of a word. Take this text for example:
NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=D7=A9=D7=95=D7=A8=D7=94 =D7=A
8=D7=90=D7=A9=D7=95=D7=A0=D7=94.\n=D7=94=D7=A9=D7=95=D7=A8=D7=94 =D7=94=D7=
... (7 Replies)
Discussion started by: dotancohen
7 Replies
4. Shell Programming and Scripting
Is there a way to fix the width of the word being printed to a file? I am trying to create an output to a file with columns , like a spread sheet. I have used "\t" to adjust the columns but still it does not show well in the file, mainly due to the variable length values in the column so \t does... (1 Reply)
Discussion started by: davidtd
1 Replies
5. Shell Programming and Scripting
awk "BEGIN {if($MessageREAD<$ThresholdW)
{print \"OK\" ; exit 0}
else if(($MessageREAD>=$ThresholdW) && ($MessageREAD<$ThresholdC))
{print \"WARNING\" ; exit 1}"
else if($MessageREAD<=$ThresholdC)
{print \"CRITICAL\" ;... (4 Replies)
Discussion started by: SkySmart
4 Replies
6. AIX
Hi
I use Rapid 7 to check some servers ( AIX 5.3 ) for security problems. There are 2 problems I don't know to deal with
1.
Problem : TCP Sequence Number Approximation Vulnerability
Solution :
_Enable TCP MD5 Signature
2.
Problem : HTTP Basic Authentication Enable
Solution :
_ Use... (5 Replies)
Discussion started by: bobochacha29
5 Replies
7. Shell Programming and Scripting
I have this shell script that I wrote to check an input file to see if it is empty or not, and then clean the file from any line that starts with the sign "<" (without quotation marks" and then spell the number of line of the file, and the empty lines, too. The script then will create two output... (11 Replies)
Discussion started by: faizlo
11 Replies
8. UNIX for Advanced & Expert Users
Hey guys,
I am trying to make print a pattern with * on a 10*10 two dimensional array in a for loop and I want the incoming 10*10 to overlap the previous 10*10 so that the * look like it is moving. is there a way to fix the screen position?
ever time it prints a 10*10 the screen moves.
... (3 Replies)
Discussion started by: amit14august
3 Replies
9. Shell Programming and Scripting
can someone please help me spot and fix the issue with the following code:
awk -F, -v SEARCHPATT="(Wed|Tue)" -v ADDISTR="Mon|Tue|Wed|Thu|Fri|Sat|Sun" -vVF="$VALFOUND"
"BEGIN{ {D = D = 1
D = D = 2
}
$0 ~ "," VF "," {L = 1 ... (9 Replies)
Discussion started by: SkySmart
9 Replies
LEARN ABOUT CENTOS
ibus-table-createdb
IBUS-TABLE-CREATEDB(1) IBUS-TABLE-CREATEDB(1)
NAME
ibus-table-createdb - create ibus-table database from table source
SYNOPSIS
ibus-table-createdb [ [ -n name ] [ --name name ] ] [ [ -s source ] [ --source source ] ] [ [ -e extra ] [ --extra extra ] ] [
[ -p pinyin ] [ --pinyin pinyin ] ] [ -o ] [ --no-create-index ] [ -i ] [ --create-index-only ] [ -d ] [ --debug ]
DESCRIPTION
ibus-table-createdb creates a database for ibus-table from a source table.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-n database-file specifies the file name for the binary database for the IME. The default is ''. If the file name of the database is
not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file
name of the database.
-s source-file specifies the file which contains the source of the IME. The default is ''.
-e extra-words-file specifies the file name for the extra words for the IME. The default is ''.
-p pinyin-file specifies the source file for the pinyin. The default is '/usr/share/ibus-table/data/pinyin_table.txt.bz2'.
-o Do not create an index for a database (Only for distribution purposes, a normal user should not use this flag!)
-i Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is
required when this option is used.
-d Print extra debug messages.
EXAMPLES
ibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt
Create the binary database ``ipa-x-sampa.db'' from the source file ``ipa-x-sampa.txt''.
ibus-table-createdb -i -n ipa-x-sampa.db
Create an index for the database ``ipa-x-sampa.db''.
AUTHOR
This manual page was written by Mike FABIAN <mfabian@redhat.com>.
Apr 18, 2013 IBUS-TABLE-CREATEDB(1)