hmmm woops
I just retested to make sure I didn't have a typo or something.
and realized the first time round i never actually tested to make sure i could delete an invalid item. It works we just had the if/else wrong way around.
Okay, well this is more or less my first attempt at writing a shell script.
Anyways, here's my code:
cd ${PATH}
if
then
rm ${FILE}
./anotherScript
else
exit 1
fi
exit 1
Anyways, it's a pretty simple script that is supposed to search for the... (4 Replies)
Hello, i have a script which checks if the user entered 8 numeric characters in the form of YYYYMMDD (birth date). If the user entered any non numeric characters, an error will be displayed:
# Check to see if the 8 characters are all numbers
# If not show error essage
# And prompt user... (4 Replies)
Hi,
I want to use grep inside a test statement, but I am getting an error message.
Two variables
testvarNum=5
testvarNonNum=x
echo $testvarNum | grep *
The result of this is as follows:
5
However, when I try the following (i.e. to test if the variable is numeric or non-numeric):... (3 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hi all. I am trying to compare and filter two files. I have a bigfile.txt of names and ids and a smallfile.txt of ids only. What I am trying to do is use a while read loop to read the ids in the bigfile and then echo the name and id only if the id exists in the small file. Basically, I'm trying to... (5 Replies)
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Hi,
Is there a way to check if the openssl part of the below execution returns non zero without freezing the flow of the script ?
var1=$(echo | openssl s_client -connect $url 2>/dev/null | openssl x509 -noout -issuer -subject -dates)
echo $?
Output: 0
while i was expecting the... (2 Replies)
As an exercise, I'm trying to re-write this code without the compound square brackets, using grep and test. Need to know what to do about the "equal-tilde".
#!/bin/bash
# test-integer2: evaluate the value of an integer.
INT=-5
if +$ ]]; then
if ; then
echo "INT is zero."
else
if ; then... (17 Replies)
read a
if test grep EOF $a
then echo yes file
else
echo no
fi (1 Reply)
Discussion started by: iamsumibisht
1 Replies
LEARN ABOUT SUNOS
asadmin-delete-jndi-resource
asadmin-delete-jndi-resource(1AS) User Commands asadmin-delete-jndi-resource(1AS)NAME
asadmin-delete-jndi-resource, delete-jndi-resource - removes the JNDI resource
SYNOPSIS
delete-jndi-resource --user admin_user[--password admin_password][--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] jndi_name
Removes the JNDI resource. This command is supported in remote mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script.
--echo setting to true will echo the command line statement on the standard output.
--interactive prompts you for the required options that are not already specified.
OPERANDS
jndi_name name of the JNDI resource to be deleted.
Example 1: Using the delete-jndi-resource command
asadmin> delete-jndi-resource --user admin1 --password adminadmin1
--host pigeon --port 5001 sample_jndi_resource
Command delete-jndi-resource executed successfully
Where: sample_jndi_resource is the JNDI resource to be deleted.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-create-jndi-resource(1AS), asadmin-list-jndi-resources(1AS)J2EE 1.4 SDK March 2004 asadmin-delete-jndi-resource(1AS)