I know in bash to work with digit in % => if ["$ x" == "$ y"] then fi
the C-shell does not work with data in % ???
You are doing string comparison with this syntax in either bash or Korn shells (and I believe that you need [[ and ]] to use ==). With string comparison you have to be careful as you might not get what you expect. Consider the statement where the variables evaluate to something like this:
Written this way, the expression will evaluate to false, not true as you might expect.
If you use the (deprecated) form with 'gt' instead of '>' to force a numeric comparison
you will get an error: 40%: more tokens expected
If you wrote the if statement in ksh/bash using the current standard it would also fail if the variables evaluate to a string with a trailing %:
running this in ksh yields: line 6: 60% > 50% : arithmetic syntax error.
Hi,
I am doing the following but it complains and says "for:badly formed number"
does anyone know why?
#!/bin/tcsh
foreach(....)
............
set depth=64
set width=23
if ($depth==64) then
echo "if"
set addr_bits=5
else
echo "else"
endif
echo "addr_bits:$addr_bits"
echo... (3 Replies)
I have the following script running every day numerous times a day and it works fine, but very occasionally I get the following error
if: Badly formed number.
Anyone know why?
Here is the script that runs with the follow parms
LCTMDBSE 100000 130000 160000
#!/bin/csh
... (0 Replies)
% history clean
history: Badly formed number. :(
% echo $0
/usr/local/bin/tcsh
% uname
SunOS
% grep -e "hist" .tcshrc.user
set history=90
set savehist=80
Please suggest what could be the problem here. Thanks in advance. (1 Reply)
Hey,
I am trying to check if an integer is even in a tcsh script
This is what I am running now
set lattest = ` echo $latmin "%2" | bc -l `
echo $lattest
if ( $lattest == 0 ) then
echo "min is already even"
else if ( $lattest =! 0 ) then
set latmin = ` echo $latmin "+1" |... (2 Replies)
I want to run my shell script to the limit number.Suppose I know in advance that MAX=5 then I want that my script run 5 times only.Something like below$ vi testingMAX=5COMMAND="ssh -l stpuser VHLDVWSAD001 /projects/st/utils/deploy/deployall.sh >/dev/null 2>&1 &" ; sleep 20;count=0while... (2 Replies)
Hi,
I've to wait until a file generated and once its generated, source another script in Linux terminal.
Please help me as this is very very urgent.
The code should be something like
if ( -e "/abc/xyz/a.txt )
source aaa.csh
else
sleep
This should be repeated till the if... (4 Replies)
hi guys. i have a question for you
i have a one file and inside this file there are 1000 lines and each line is a linux command
running this commands takes long time so i want to create one bash script and run this lines in a loop with max number of threads
for example i want to run... (2 Replies)
Discussion started by: avtaritet
2 Replies
LEARN ABOUT DEBIAN
ldap2tinydns-conf
LDAP2TINYDNS-CONF(1) General Commands Manual LDAP2TINYDNS-CONF(1)NAME
ldap2tinydns-conf - part of the ldap2dns DNS management system
SYNOPSIS
ldap2tinydns-conf
DESCRIPTION
This manual page documents briefly the ldap2tinydns-conf command. This manual page was written for the Debian GNU/Linux distribution
because the original program does not have a manual page yet.
ldap2tinydns-conf is a shell script to help configure ldap2dns for use with tinydns. This script wil add the directory structure and files
required to run ldap2dns under daemontools.
Run this script within your tinydns directory.
For example: root@host[/var/tinydns]# ldap2tinydns-conf
This creates the ldap2tinydns directory under your tinydns directory and adds the default configuration under ldap2tinydns/env.
OPTIONS
This shell script does not take any commanline options.
SEE ALSO
tinydns, ldap2dns(1).
Please visit the project homepage for more detail: [http://ldap2dns.tiscover.com/]
AUTHOR
This manual page was written by Johann Botha <joe@blio.net>, for the Debian GNU/Linux system and is distributed under the GPL version 2 or
later.
Jacob Rief <jacob.rief@tiscover.com> is the original author of this program..
June 7, 2001 LDAP2TINYDNS-CONF(1)