Hello,
I'm trying to put together a script that involves pulling data from a config file. I'm attempting to write an if statement to validate one of the pieces of data from the config file, but I think I'm fat fingering it somehow.
$config{VALUE} is being pulled from a config file but can only be one of three options. The hope is to write an if statement to ensure that $config{VALUE} is one of those 3 options.
This is what I'm attempting to use, but if intentionally supply an invalid option, it doesn't catch.
Code:
if (($config{VALUE} ne "A") || ($config{VALUE} ne "B") || ($config{VALUE} ne "C"))
{
die "Missing or Invalid VALUE.";
}
Hi,
I am trying to use && set up to match two conditions within ksh:
if &&
then
'''Do something
if
somehow, I keep getting error message telling me that ] is missing.
What's wrong with my code?
Thanks a lot for your help! (1 Reply)
I'm totally new with bash programming and I don't get it how to put two conditions in one if statement. My code looks like this:
h=`date +%k`
if && ]; then$h is 10 but I don't get into my if statement. What's wrong here? (5 Replies)
I have a text file that contains lines similar to the following:
-----------------------------------------------------------
fall for setup
CSHRC0 'gnd';
CSHR0 'gnd';
rise for setup
rise for hold
CSHRC0 'gnd';
CSHR0 'gnd';
fall for hold ... (4 Replies)
I have a script that runs on multiple servers. What I want to do is have the script do the following:
if $(hostname) is equal to server or server2
then
TO_DIR=go
else
TO_DIR=stop
fi
I have tried:
if
if ]
Server is hpux.
any ideas? (1 Reply)
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
When I try the below if Condition with single condition its working fine.
But when I try to Club both its working . But giving wrong results.
In my case
cond1 = -f ${filename1} = true
cond2 = -f ${filename2} = true
But Cond1 & Cond2 is resulting in False ??? Please advise
... (5 Replies)
Hello,
I am using shell scripting and I am recieving odd results from my if statement
if
I want it to enter the loop only if L1 is equal to zero and one of the other criteria are filled, however it is entering at other times as well. What can i do to fix this? i tried seperating it... (6 Replies)
I was trying to write multiple conditions inside the if statement but its not working.
export VAR_NM=abc.txt
export CURR_DT=20131011
export PREV_DT=20131012
if &&
then
echo "Yes"
else
echo "NO"
fi
It should return Yes but returning NO always.Appreciate any help. (3 Replies)
#!/bin/bash
if &&
then
echo "True"
else
echo "False"
fi
Hi everyone, I am new to UNIX, here I have a if statement elevating two boolean conditions. I thought the output should be True because there are + in the statement. But it turns out to be False.
Can anyone... (3 Replies)
I wish to check two conditions inside the if statement
Condition 1: The two file contents should be identical // using cmp command for this.
Condition 2: The two filenames should NOT be the same.
This is what i did in vain.
if ]; then
where entry1 and entry2 are
ls *.txt | while... (7 Replies)
Discussion started by: mohtashims
7 Replies
LEARN ABOUT DEBIAN
xslt-config
xslt-config(1) 1.0.0 xslt-config(1)NAME
xslt-config - script to get information about the installed version of libxslt
SYNOPSIS
xslt-config [--prefix[=DIR]] [--libs] [--cflags] [--version] [--help]
DESCRIPTION
xslt-config is a tool that is used to determine the compile and linker flags that should be used to compile and link programs that use
libxslt.
OPTIONS
xslt-config accepts the following options:
--version
Print the currently installed version of libxslt on the standard output.
--libs Print the linker flags that are necessary to link a libxslt program.
--cflags
Print the compiler flags that are necessary to compile a libxslt program.
--prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that libxslt was built with when computing the output for the --cflags
and --libs options. This option must be specified before any --libs or --cflags options.
AUTHOR
This manual page was adapted from the xml-config by Will Newton <will@misconeption.org.uk>.
The xml-config manual page was written by Fredrik Hallenberg <hallon@lysator.liu.se>, for the Debian GNU/linux system (but may be used by
others).
Version 8 March 2002 xslt-config(1)