10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
Need some help with the shell scripting here.
#!/bin/ksh
ps -ef | grep -i sample.ksh | grep -v grep > abc.txt
if
then
echo "sample.ksh is executing"
else
echo "sample.ksh is not executing"
fi (1 Reply)
Discussion started by: jayadanabalan
1 Replies
2. Shell Programming and Scripting
the scenario is -
If I pass 3 three arguments( run time) , it should list all .txt files from a path to temp file
if I pass 2 arguments ( run time) , it should list all .csv files from the same path to another temp file
the above scenario should be handled in single code and also I dont know ... (2 Replies)
Discussion started by: Prashanth B
2 Replies
3. Shell Programming and Scripting
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies
4. UNIX for Dummies Questions & Answers
I have a few aliases set up on AIX servers in my .kshrc file. Some of them contain multiple commands that are piped together.
A simple example would be something like this:
# alias to list directory contents as root and sort by size.
alias lss='sudo ls -l | sort -nbk5'
When I call... (5 Replies)
Discussion started by: derndingle
5 Replies
5. Shell Programming and Scripting
Hi, hope everyone are fine. Please find my issue below, and I request your help in the same
In a configuration file, i have a variable defined as below
TEST = 'One','Two','Three'
I am trying to pass this variable in to a sql script which is define in a pl/sql block
as follows,
In the... (1 Reply)
Discussion started by: ramakanth_burra
1 Replies
6. UNIX for Dummies Questions & Answers
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
Discussion started by: mnjx
3 Replies
7. Shell Programming and Scripting
I have a shell script which is invoked by passing an argument. The outer shell script calls another subshell and I want the argument passed down to flow down to the subshell.
E.g
Invoking a shell ======>> abc_refresh.ksh NM
Below is the content of abc_refresh.ksh
Value1=$1... (7 Replies)
Discussion started by: Mihirjani
7 Replies
8. Shell Programming and Scripting
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
Discussion started by: zmfcat1
4 Replies
9. Shell Programming and Scripting
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Discussion started by: Tuxidow
5 Replies
10. UNIX for Dummies Questions & Answers
I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
Discussion started by: jpprial
4 Replies