Sponsored Content
Top Forums Shell Programming and Scripting Command timeout from inside script. Post 302595597 by gencon on Friday 3rd of February 2012 01:58:50 PM
Old 02-03-2012
Quote:
Originally Posted by Corona688
Try kill without the -9.
Ok, so this is really strange, at least I don't get it.

I created a new script with nothing in apart from starting a process using wget to download a 100 MB file, storing the pid and then killing it. It did not matter whether I used kill or kill -9 or whether I redirected to /dev/null 2>&1 or not. The shell did not show any line of output concerning the kill at all, but the kill succeeded. But back in my 'real' script it happens every time regardless of whether I use the -9 or redirect to /dev/null - every time I get a line like this:

Code:
./getipto: line 221: 11550 Killed $urlDownloaderProg "$urlToDownload" > $tempFileName

How could it make any difference? Inside an if statement? Inside a function? I just don't understand this behaviour at all.

Any ideas anyone?

Thanks.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run the command inside perl script

I have a command which will run fine in a unix command prompt. Can you tell how to interprete this command inside perl script...... The command is : perl -pe 's/(\|333\}.*)\}$/$1|1.6}/' FIA.txt This will search for the number 333 and appends 1.6 at the end of that line....... (1 Reply)
Discussion started by: vinay123
1 Replies

2. UNIX for Dummies Questions & Answers

Exit out of the Script Command inside a Script

I'm new to Linux. I have a bash script that invokes an executable. I'd like use the SCRIPT command inside the script and exit out of the script command after it writes to the file. Does this make sense? Below is an example of the contents of my script. #BEGIN SCRIPT script typescript... (6 Replies)
Discussion started by: jmungai
6 Replies

3. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

4. Shell Programming and Scripting

How to monitor a command inside shell script

Hi All, Is there any way to monitor a command inside shell script ? I have a script inside which I have a tar command which zips around 200GB data. tar zcvf $Bckp_Dir/$Box-BaseBackup-$Day.tar.gz * --exclude 'dbserver_logs/*' --exclude postmaster.pid --exclude 'pg_xlog/*' I want to... (3 Replies)
Discussion started by: sussus2326
3 Replies

5. Shell Programming and Scripting

Using ssh command inside a script

Hi, I have a script file in server A. Inside the script file, I first have a ssh command that will connect to a remote server B. In the same script file itself, I have a sequence of commands that has to be run in server B. I am embedding these commands in the script file that I have in server A.... (2 Replies)
Discussion started by: mick_000
2 Replies

6. Shell Programming and Scripting

Can i use if else inside expect command in shell script?

hii,, I am trying to automate jira. during my scripting using bash script, in the terminal i got the terminal message like this: "Configure which ports JIRA will use. JIRA requires two TCP ports that are not being used by any other applications on this machine. The HTTP port is where you... (1 Reply)
Discussion started by: nithinfluent
1 Replies

7. Shell Programming and Scripting

Issue with ls command inside script

Hi , DIR1 has only one file with .txt extension , trying to get the size of that file using the following script #!/bin/ksh foldr_1="/etc/DIR1" #echo "$foldr_1" sze_fdr1=$(ls -ltr foldr_1/*.txt |awk '{ print $5 }') echo "$sze_fdr1" After executing the above script getting... (1 Reply)
Discussion started by: smile689
1 Replies

8. Shell Programming and Scripting

How to find whether a particular command has failed inside an sftp script?

hi, how can i know whether a command inside an sftp script has failed or not? i have a sftp expect script #!/usr/bin/expect spawn /usr/bin/sftp abc@ftp.abc.com expect "sftp>" send "cd dir\r" expect "sftp>" send "mput abc.txt\r" expect "sftp>" send "mput def.xls\r" expect "sftp>"... (5 Replies)
Discussion started by: Little
5 Replies

9. Shell Programming and Scripting

Using script command inside a script or emulating it

My script needs to take a folder path to the location of a C program, and run the program until the user selects exit in his C program. The script needs to create a transcript to a text file while the C program is running. Creating a transcript can be easily done with the script command but it... (2 Replies)
Discussion started by: syntax_eror
2 Replies
NETSCRIPT-2.2.conf(5)						File Formats Manual					     NETSCRIPT-2.2.conf(5)

NAME
/etc/netscript/network.conf - interface, firewalling, and QoS configuration file. /etc/netscript/if.conf - interface setup shell script file /etc/netscript/qos.conf - QoS setup shell script file /etc/netscript/ipfilter.conf - IP chains filtering shell script file /etc/netscript/srvfilter.conf - server IP filter shell script file DESCRIPTION
This manpage is a place holder until something better is written when the netscript itself has stopped changing rapidly. Please see the README file in the /etc/netscript directory, and READ the configuration files if you need to change them. Apart from net- work.conf, all of them contain sh (1) shell script functions which are there so that various things can be altered or hooked in at the right place. Network.conf contains the full network setup details, including special interface setup for the likes of ciped/pppd/wanconfig, and is fully commented with examples given. UPGRADE PATH FROM KERNEL 2.2.X The firewall/IP filtering stuff in ipfilter.conf is the part that changed radically with the move to iptables and a far better way of set- ting up the IP filtering rules, however the QoS and interface startup/shutdown in if.conf have changed but are backwards compatible with the old 2.2.x ipchains version of netscript for the interface address configuration settings. You will have to set up the filtering again to use iptables by directly using the iptables commands. Also, the kernel 2.2.x version scripts are set up so that iptables is only run on a 2.4.x kernel, otherwise IP forwarding is disabled if beforehand you set IPFWDING_KERNEL to FILTER_ON in network.conf. This means that when you upgrade a box to a 2.4.x router kernel, you should then be able to reboot it and log into remotely and upgrade netscript to the version that will support 2.4.x. In this situation, if you have set old IPFWDING_KERNEL setting to FILTER_ON beforehand in network.conf, all IP forwarding through the box will also be disabled. This means that you can safely remotely upgrade a firewall. SEE ALSO
netscript(8), ipchains(8), iproute(8), brcfg(8). AUTHOR
This manual page was written by Matthew Grant <grantma@anathoth.gen.nz>, for the Debian GNU/Linux system (but may be used by others). BUGS
The author is lazy. He needs to write btter man pages... November 23, 2000 NETSCRIPT-2.2.conf(5)
All times are GMT -4. The time now is 12:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy