06-16-2004
I come back with an other question
a=1
c=$(printf "%s\n" 'scale = 2; 7/4' | bc)
when i do:
if [ $a -eq $c ]
it find the same number [ 1 -eq 1 ]
And I want compare [ 1 -eq 1.75 ] or [ 1 -eq 1,75 ]
Is it possible?
thanks
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I Use mkcd for save same directories into DVD, But the commande not complete succefuly
mkcd -r directorie_i_whish_save -d /dev/cd1
please it is very urgent
thank you :confused: :confused: (1 Reply)
Discussion started by: mktahar
1 Replies
2. AIX
I can write into DVD? I have USE "MKCD" command
mkcd -r directorie -d /dev/cd1
please help me it s urgent (2 Replies)
Discussion started by: mktahar
2 Replies
3. IP Networking
I have a system that i want to reach via a vpn created vi a fierwall.The fierwall in an other system.
The ip i am trying to get to is 172.16.4.48
I need to get to it via the hme1 interface.
The vpn gateway has this ip 172.30.50.1
I need to clean up the routing table and make this work; or is it... (5 Replies)
Discussion started by: waterboy
5 Replies
4. UNIX for Advanced & Expert Users
Hi,
I want to create a new environment variable (JAVA_HOME), but when I open a new shell this varible is delete...
to create the variable I do :
export JAVA_HOME=/usr/java/jdk
and I verify with :
echo $JAVA_HOME
and it's work...
But When I open a new shell this variable is forget...
( It... (2 Replies)
Discussion started by: marcel_kobain
2 Replies
5. Filesystems, Disks and Memory
hi
i'm trying to mount my usb device in fedora 7(vmware)
i use the comand:
mount /sda1 /mnt
but when i go to /mnt i find the content of the folder /boot.
can u tell me what's the problem? (2 Replies)
Discussion started by: jalil smail
2 Replies
6. Solaris
Bonjour,
J'ai ajouté par erreur à un sous mirroir des disques de cette facon :
metattach d53 c2t90d0s0 c2t90d1s0 ... alors que j'aurais du faire un stripe par disque (comme ça) :
metattach d53 c2t90d0s0
metattach d53 c2t90d1s0
..
Derriere, j'ai fais un growfs -M du FS pour l'aggrandir et... (1 Reply)
Discussion started by: phil.nakache
1 Replies
7. AIX
Bonjour,
Je travail sur un environnement AIX 5.3 et je n'arrive pas à augmenter mon FS ni mon LV.
J'utilise les commande suivante chfs -a size=+4G /home/guesting
ou extendlv sybase5lv 4 et rien à faire il me retourne que le maximum capacity est atteint au niveau du LV alors qu'il y a des PP de... (6 Replies)
Discussion started by: mosta
6 Replies
8. Linux
bonjour,
j'ai un serveur Linux ayant 2 interfaces eth0 et eth1. j'ai configuré deux adresses IP de deux réseaux différents sur les 2 interfaces, et je les ai connecté sur 2 commutateurs différents.
l'adresse IP de eth0 répond sans problème au ping des équipement de son réseau d'appartenance, malheureusement cela... (1 Reply)
Discussion started by: cerco
1 Replies
LEARN ABOUT DEBIAN
shell-quote
SHELL-QUOTE(1p) User Contributed Perl Documentation SHELL-QUOTE(1p)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.8.4 2005-05-03 SHELL-QUOTE(1p)