10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I wrote the following case statement to replace a series of 'ELIF' statements as it looks better and is easier to maintain. However, for some reason the commands don't fully work in this format. Take option 1. It should call a script that runs in the background but it doesn't work. Can anyone... (3 Replies)
Discussion started by: user052009
3 Replies
2. Shell Programming and Scripting
Hello,
I have used a chunk of ksh script similar to this in many places without any issue:
while :
do
print;
read OPTION?"Enter a number (q to quit): "
expr ${OPTION} + 1 >/dev/null 2>&1
CHECKVAL=$?
if }" != ${OPTION} ]; then
... (2 Replies)
Discussion started by: port43
2 Replies
3. Shell Programming and Scripting
Hi guru,
I'm making crazy cause an issue on a ksh shell I made.
In this shell I want to execute unix command on a remote machine using an ssh connection like ssh user@host 'command'.....
The command is very simply, is an ls on a remote directory but it give me an unexpected result.
The... (4 Replies)
Discussion started by: leobdj
4 Replies
4. Shell Programming and Scripting
Hi,
Can any body please tell me what does -z do in ksh?
I need to understand what does below code do?
FILE_LIST is an array which store multiple number of files...
if } ]]; then
echo "EVDO file not found
fi
I hope I'm clear on my query (3 Replies)
Discussion started by: annybase
3 Replies
5. Shell Programming and Scripting
First time post. I did a search so I didn’t see this specific issue. It seems to be a head scratcher for me.
I have an hourly job that on rare occasions, gets into an endless loop.
I’ve tried different scenarios but the current version does basically the following.
Find all the *.arc files and... (18 Replies)
Discussion started by: Sylvan303
18 Replies
6. Shell Programming and Scripting
am running the small script below.
count_a=48
count_b=48
if ; then
echo "Count matched"
else
echo "count not matched"
fi
I got the below output.
/bin/ksh: [48: not found
count not matched
It was giving the same error when I ran in another box. But I inculded /bin/ksh in the... (10 Replies)
Discussion started by: sathik
10 Replies
7. Shell Programming and Scripting
Hi all,
I have a KSH script which is kicking off an sql scripts as follows:
/usr/local/installs/instantclient_10_2/sqlplus -s username/password @$sql_path/sql_query.sql > $tmp_path/sql_query_results
The problem I have is that sometimes the 10g Oracle Database spits out an error saying... (4 Replies)
Discussion started by: Donkey25
4 Replies
8. Shell Programming and Scripting
Hello All,
I'm tryying to concatenate string and variables value in ksh, but i'm unable to do it, can someone please help in rectifying my error,
here is the code i have written,
#!/usr/bin/ksh -x
cat $1 | while read fileline
do
val1= echo $fileline | awk -F, '{print $1}'
val2= echo... (3 Replies)
Discussion started by: arvindcgi
3 Replies
9. Shell Programming and Scripting
Hi all,
I am struck with syntax for long time,
Need to purge some lines from given file
Not able to use value of $x
Example of ksh script...
Facing some syntax issue.
Have Tried ‘with single , double ,backtick “” ` and \ escape character , doesn't seem to work.
<line 1> echo $x #... (2 Replies)
Discussion started by: manav666
2 Replies
10. Shell Programming and Scripting
user_account()
{
set -x
nodename=$1
# set userid to user0
userid="user0"
echo outside:pid $$
cat $MY_DIR/user_accounts | while read line
do
# line="node1 user1"
echo inside do: pid $$ line:$line userid:$userid
poss_node=`echo $line |awk '{print $1}'`... (2 Replies)
Discussion started by: jasmeet100
2 Replies