08-23-2007
If..else command gives error
Hi,
I am a newbie and was getting an error when I use the if..else syntax. The script looks like this
echo "Please specify the database version (9i/10g): "
read VERS
if [ "$VERS"="9i" ]
then
echo "Its a 9i Database"
sqlplus -s $puser/$ppass << EOF_I
spool cxcreate9i.lst
@ cxtool/1.1/scripts/backend/cxcreate;
spool off
exit;
EOF_I
else
echo "Its a 10g Database"
fi
Now when I execute it I get the following error:
./test.sh: line 17: syntax error: unexpected end of file
If I remove the if else syntax and just put the middle portion in the script, it executes fine.
sqlplus -s $puser/$ppass << EOF_I
spool cxcreate9i.lst
@ cxtool/1.1/scripts/backend/cxcreate;
spool off
exit;
EOF_I
I am not able to understand what am I doing wrong here.
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Could some one help me please ?
When I execute this command
# paste -s -d"^m" swagent.log | sed '{s/\"\./\"\.\n/g}' > swagent.new
I get this error.
sed: Function {s/\"\./\"\.\n/g} cannot be parsed.
Many Thanks in advance
Regards,
Nagu (1 Reply)
Discussion started by: srnagu
1 Replies
2. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
3. Shell Programming and Scripting
Hi,
This error is actually out of implementing the command posted here -
https://www.unix.com/shell-programming-scripting/155589-remove-blank-lines-merge-lines-shell.html
Here is the error i get -
awk: Input line xxxxx cannot be longer than 3,000 bytes.
The source line number is 1.... (1 Reply)
Discussion started by: dvah
1 Replies
4. Shell Programming and Scripting
hello
every time i run the following code
for val in fileX fileY fileZ
do
$val=`ls -l $val | awk '{print $5}'`
done
i got error message command not found , i tried to add ' and " but nothing works
its only worked wen remove $val=
but i want the name of the file and the value
... (9 Replies)
Discussion started by: mogabr
9 Replies
5. Shell Programming and Scripting
Hi All
We are migrating our projects from unix environment to linux. I tried running a install script which sets up my project, i.e. the directory structure and all. But in the middle of the script i started receiveing following error : nawk: command not found .
So i need to know which... (1 Reply)
Discussion started by: vee_789
1 Replies
6. Shell Programming and Scripting
Hi,
We have a shell script which looks into a directroy for any folder older than 30 days and removes them. The command being used is
find $ARCHIVE_DIR -type d -mtime +$PURGE_HIST_DAYS -exec rm -rf {} \;
It removes some folders but then throw below errors for others:
find:... (2 Replies)
Discussion started by: DejaVu
2 Replies
7. UNIX for Dummies Questions & Answers
Hello all.
I am currently using Red Hat Enterprise Linux Server release 5.8 (Tikanga).
I have multiple users on this system and intend to use nail command to send out emails.
When I enter the command:
nail <some-email-address>
its accepts the command and sends out an email.
But when I... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
8. UNIX for Advanced & Expert Users
Hi
I have used the AT command in my shell script to schedule the jobs. Sometimes it works fine but sometimes it throws an error, such as :
at: can't change the owner of your job to you.
I could not find any solution to this issue yet.
If anyone can please provide any pointer what doe this... (3 Replies)
Discussion started by: MD21
3 Replies
9. Shell Programming and Scripting
i am trying the blow command in vain on Linux Terminal.
kill -9 `ps -eaf | grep weblogic.NodeManager | grep wls103 | awk '{print $2}'`
kill: usage: kill pid | jobspec ... or kill -l
kill -9 $(ps -eaf | grep weblogic.NodeManager | grep wls103| awk '{print $2}')
kill: usage: kill pid |... (7 Replies)
Discussion started by: mohtashims
7 Replies
10. AIX
exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1).
0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded.
0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies
LEARN ABOUT DEBIAN
gnutls-serv
gnutls-serv(1) General Commands Manual gnutls-serv(1)
NAME
gnutls-serv - GnuTLS test server
SYNOPSIS
gnutls-serv [options]
DESCRIPTION
Simple server program that listens to incoming TLS connections.
OPTIONS
Program control options
-d, --debug LEVEL
Specify the debug level. Default is 1.
-h, --help
prints this help
-l, --list
Print a list of the supported algorithms and modes.
-q, --quiet
Suppress some messages.
-v, --version
prints the program's version number
Server options
-p, --port integer
The port to listen on.
--nodb Does not use the resume database.
--http Act as an HTTP Server.
--echo Act as an Echo Server.
TLS/SSL control options
--priority PRIORITY STRING
TLS algorithms and protocols to enable. You can use predefined sets of ciphersuites such as:
PERFORMANCE all the "secure" ciphersuites are enabled, limited to 128 bit ciphers and sorted by terms of speed performance.
NORMAL option enables all "secure" ciphersuites. The 256-bit ciphers are included as a fallback only. The ciphers are sorted by
security margin.
SECURE128 flag enables all "secure" ciphersuites with ciphers up to 128 bits, sorted by security margin.
SECURE256 flag enables all "secure" ciphersuites including the 256 bit ciphers, sorted by security margin.
EXPORT all the ciphersuites are enabled, including the low-security 40 bit ciphers.
NONE nothing is enabled. This disables even protocols and compression methods.
Check the GnuTLS manual on section "Priority strings" for more information on allowed keywords.
Examples:
"NORMAL"
"NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL"
"NORMAL:-ARCFOUR-128" means normal ciphers except for ARCFOUR-128.
"SECURE:-VERS-SSL3.0:+COMP-DEFLATE" means that only secure ciphers are enabled, SSL3.0 is disabled, and libz compression enabled.
"NONE:+VERS-TLS-ALL:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL:+SIGN-RSA-SHA1"
"NORMAL:%COMPAT" is the most compatible mode
-g, --generate
Generate Diffie-Hellman Parameters.
--kx kx1 kx2...
Key exchange methods to enable (use gnutls-cli --list to show the supported key exchange methods).
-p, --port integer
The port to connect to.
Certificate options
--pgpcertfile FILE
PGP Public Key (certificate) file to use.
--pgpkeyfile FILE
PGP Key file to use.
--pgpkeyring FILE
PGP Key ring file to use.
--pgptrustdb FILE
PGP trustdb file to use.
--srppasswd FILE
SRP password file to use.
--srppasswdconf FILE
SRP password configuration file to use.
--x509cafile FILE
Certificate file to use.
--x509certfile FILE
X.509 Certificate file to use.
--x509fmtder
Use DER format for certificates
--x509keyfile FILE
X.509 key file to use.
SEE ALSO
gnutls-cli(1), gnutls-cli-debug(1)
AUTHOR
Nikos Mavrogiannopoulos <nmav@gnutls.org> and others; see /usr/share/doc/gnutls-bin/AUTHORS for a complete list.
This manual page was written by Ivo Timmermans <ivo@debian.org>, for the Debian GNU/Linux system (but may be used by others).
December 1st 2003 gnutls-serv(1)