02-28-2008
Quote:
Originally Posted by
manikantants
this should work provided following are correct
Under /opt/lotus/notes/, there should be a file or directory with name in variable '$jarFile'.
Can you run the script in debug mode ? (give 'set -x' in the begining of the script) and paste the result here ?
file Name :::Notes_debug.start
set -x
jarFile=Notes.jar
if [ -f "$jarFile" ]; then
jarPath=`pwd`
fi
if [ $jarPath="" ]; then
jarPath= find /opt/lotus/notes/ -name $jarFile
echo "the jar path $jarPath"
fi
Output
+ jarFile=Notes.jar
+ [ -f Notes.jar ]
+ [ = ]
+ find /opt/lotus/notes/ -name Notes.jar
+ jarPath=
/opt/lotus/notes/65040/ibmpow/Notes.jar
+ echo the jar path
the jar path
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying to assign the output of a command to a variable and then concat it with another string, however, it keeps overwriting the original string instead of adding on to the end of the string.
Contents of test.txt --> This is a test
var1="`head -n 1 test.txt`"
echo $var1 (This is a... (5 Replies)
Discussion started by: oma04
5 Replies
2. Shell Programming and Scripting
I have the sql file cde.sql with the below contents:
abcdefghij
abcwhendefothers
sdfghj
when no one else
when others
wwhen%others
exception when others
Now I want to search for the strings containing when others together and ceck whether that does not occur more than once in the... (2 Replies)
Discussion started by: kprattip
2 Replies
3. Shell Programming and Scripting
Hello friends,
I doing the follwing script , but found problem to store it to a shell variable.
#! /bin/sh
for temp in `find ./dat/vector/ -name '*.file'`
do
echo $temp
nawk -v temp=$temp 'BEGIN{ split(temp, a,"\/"); print a}'
done
output:
./dat/vector/drf_all_002.file... (6 Replies)
Discussion started by: user_prady
6 Replies
4. Shell Programming and Scripting
I am new to unix shell scripting.
I was trying to convert each lines in a file to upper case.
I know how to convert the whole file.
But here i have to do line by line.
I am getting it in the below mentioned script
#!/bin/bash
#converting lower to upper in a file
#tr "" "" <file1... (3 Replies)
Discussion started by: jpmena
3 Replies
5. Shell Programming and Scripting
When I run time -p <command>, it outputs:
real X.XX
user X.XX
sys X.XXwhere X.XX is seconds. How I can take just that first number output, the seconds of real time, and assign that to a variable? (9 Replies)
Discussion started by: jeriryan87
9 Replies
6. Shell Programming and Scripting
First, this is bash (3.2.17), on a Mac, 10.5.7.
What I'm trying to do is look at a list of users, and check to see if each exists. If they do, do some more stuff, if they don't, drop them into an error file.
So, my user list is:
foo - exists
bar - does not exist
blah - does not exist
... (2 Replies)
Discussion started by: staze
2 Replies
7. Shell Programming and Scripting
I am trying to assgn the output of the select statement to a variable, like this
"VARIABLE_NAME=$ db2 "select COLUMN_NAME_1 from TABLE_NAME where COLUMN_NAME_2='VALUE_TO_CHECK'"; "
but the value that is getting into VARIABLE_NAME is
"COLUMN_NAME_1
-----------------
VALUE
1... (3 Replies)
Discussion started by: sgmini
3 Replies
8. UNIX for Dummies Questions & Answers
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies
9. UNIX for Dummies Questions & Answers
Hi I have a text file with 2 values and I am trying to assign each value to a variable and then write those to text files.
So if the textfile is data.txt with 2 values x and y
I want to assign mean=x, and stdev=y and then write these out in text files alongwith the id ($id has already been... (6 Replies)
Discussion started by: violin
6 Replies
10. Shell Programming and Scripting
Hi,
I'm writing a script that connects through ssh (using "expect") and then is supposed to find whether a process on that remote machine is running or not. Here's my code (user, host and password are obviously replaced with real values in actual script):
#!/usr/bin/expect
set timeout 1... (3 Replies)
Discussion started by: oseri
3 Replies
LEARN ABOUT REDHAT
openvt
OPENVT(1) Linux 1.x OPENVT(1)
NAME
openvt - start a program on a new virtual terminal (VT).
SYNOPSIS
openvt [-c vtnumber] [-s] [-u] [-l] [-v] [--] command command_options
DESCRIPTION
openvt will find the first available VT, and run on it the given command with the given command options, standard input, output and error
are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the
environment variable $SHELL is used.
OPTIONS
-c vtnumber
Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work.
-s Switch to the new VT when starting the command. The VT of the new command will be made the new current VT.
-u Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l.
-l Make the command a login shell. A - is prepended to the name of the command to be executed.
-v Be a bit more verbose.
-w wait for command to complete. If -w and -s are used together then openvt will switch back to the controlling terminal when the com-
mand completes.
-- end of options to openvt.
NOTE
If openvt is compiled with a POSIX (GNU) getopt() and you wish to set options to the command to be run, then you must supply the end of
options -- flag before the command.
EXAMPLES
openvt can be used to start a shell on the next free VT, by using the command:
openvt bash
To start the shell as a login shell, use:
openvt -l bash
To get a long listing you must supply the -- separator:
openvt -- ls -l
HISTORY
Earlier, openvt was called open. It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>. The -w idea is from "sam".
SEE ALSO
chvt(1), doshell(8), login(1)
19 Jul 1996 V1.4 OPENVT(1)