10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm using expect to ssh into remote machine (i know its not the best practice), and run script "script.sh".
This "script.sh" checks whether an other process (some another script) is running and if not, it runs it as some other user.
#!/bin/bash
/usr/bin/expect << EOD
set... (5 Replies)
Discussion started by: oseri
5 Replies
2. Shell Programming and Scripting
Hello All,
Greetings !!
I have a query here to all is as follows:
Question: Let's say we are running a script in a UNIX box and we have opened an another session and then made changes in script of some statements NOT to be print some values(just an example) so when I am monitoring the... (5 Replies)
Discussion started by: RavinderSingh13
5 Replies
3. UNIX for Dummies Questions & Answers
Hi
I searched this forum before posting the question, but couldnt find it, the issue
i'm facing is, i'm trying to select a column from a netezza table from a korn
shell script, but the query runs
var=$(nzodbcsql -q "select MAX(millcount) from table1";)
echo $var
it returns the value like... (10 Replies)
Discussion started by: maximus_jack
10 Replies
4. UNIX for Dummies Questions & Answers
Hi,
running this script in normal mode, no error occours
#!/usr/bin/ksh
VALUE=0
SUBJECT='sub'
ADDRESSES="aaa@gmail.com"
BODY='body'
while true
do
COUNT=$(tail -2500 /log/file.log | grep -i "error" | wc -l)
if ; then
echo "$BODY" | mailx -s "$SUBJECT" "$ADDRESSES"... (3 Replies)
Discussion started by: nash83
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
How can i restrict the execution of same script if it is running already in nohup
Thanks (1 Reply)
Discussion started by: ranabhavish
1 Replies
6. Shell Programming and Scripting
Hi I was trying to fetch data from database. But the number of rows exported were huge so i got the error. Experts please advice. Thanks a lot for your supprt. #: ./script.sh ./script.sh: xmalloc: subst.c:3076: cannot allocate 1401346369 bytes (0 bytes allocated) (2 Replies)
Discussion started by: brij123
2 Replies
7. Shell Programming and Scripting
Hello!
I'm trying to run this code to print the body of an html document (all text in between <body> and </body>) from a script but am unsure how to call it from the command line interface.
/<body>/,/<\/body>/
1s/.*<body>//
$s/<\/body>.*//p
I have tried to call it using this:
sed... (6 Replies)
Discussion started by: bgnersoon2be#1
6 Replies
8. Shell Programming and Scripting
Hi,
I am running the below script. When i run the script normally it executes fine but when i run the same script using nohup it throws an error as getStatus.sh: syntax error at line 3: `(' unexpected . Can you let me know why it is so?
while
do
. $(dirname $0)/include.sh
cd... (2 Replies)
Discussion started by: vignesh53
2 Replies
9. Shell Programming and Scripting
Hi
I have a question
Suppose i have three scripts & i have created a top level script to run these.
eg.
leaf1.csh
leaf2.csh
leaf3.csh
top.csh
Now in top.csh i have written
#!/bin/csh
leaf1.csh
leaf2.csh
leaf3.csh
Now my question is when i run this top level script when it... (1 Reply)
Discussion started by: sarbjit
1 Replies
10. Shell Programming and Scripting
1 #!/bin/ksh
2 ################################################################
3 # Written by Johnson 12/03/2008
4 # Version 1.0
5 # This script executes some SQL to provide Spike Check Report to TNS team.
6 ... (3 Replies)
Discussion started by: shivanete
3 Replies