Sponsored Content
Top Forums Shell Programming and Scripting 'script' command exits immediately Post 302514991 by jalburger on Monday 18th of April 2011 04:21:34 PM
Old 04-18-2011
'which script' shows that /usr/bin/script is running. BTW, I didn't mention before, this is Solaris 8.

---------- Post updated at 08:21 PM ---------- Previous update was at 08:03 PM ----------

I am trying to login to a router from my server & get a screen capture of some output. I used a workaround of "(ssh router) 2>&1 | tee /tmp/output.txt" which seems to work, but I'm still curious why 'script' was exiting immediately.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script exits with $? not 0 randomly, how can I see what command failed?

Hi! I have this situation with 3 shellscripts. One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1. Script 1 in turn runs script 2 (import_catalogs_buyer.sh) Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies

2. Shell Programming and Scripting

Exits from putty instead of shell script

Dear, I have written below code to initiate the log at top of my script. #Set the log file LOGFILE=<path>/<filename.log> exec > $LOGFILE 2>&1 ............... .... ... .. ............ echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n" exit 0 the logging ends only... (14 Replies)
Discussion started by: Imran_Chennai
14 Replies

3. Shell Programming and Scripting

how to run a command as soon as user exits from session

I need to write a script, where I have to get names of files that are to be deleted from a user and have to delete those files when he exits session. How to set a particular command to be run as soon as user exits from a session? Can somebody help? I have to write a script on linux system.... (3 Replies)
Discussion started by: yashashri
3 Replies

4. AIX

Getting size of all the luns immediately via script

Hi I know that to see the size of the lun I need to give the command as "bootinfo -s hdisk*" Can any one assist me with a script which if run will get the size of all the luns allocated to the server. The output of the script should be something like the one below : hdisk0 size = 24GB... (2 Replies)
Discussion started by: samsungsamsung
2 Replies

5. UNIX for Dummies Questions & Answers

Script dosent exits after executing the script

Hi i wrote a script which dosent exists after executing any help #!/bin/bash netstat -ptlen | grep 10000 if ; then echo "Hive Thrift server is running" exit 0 else echo "Hive Thrift server is down Trying to Bring up the service" | mail -s "ALERT" team@domain.com `nohup hive... (7 Replies)
Discussion started by: vikatakavi
7 Replies

6. Shell Programming and Scripting

Execute a command after ssh exits

In my .tcshrc I define and run an alias to set my terminal title. The title contains the hostname. I do this because I ssh to other machines a lot and I always need to know which host I am typing in. The alias is defined and run in the .tcshrc like this... alias tt 'echo -n "^0;`hostname -s`^G"'... (5 Replies)
Discussion started by: salvadorjoshua
5 Replies

7. Shell Programming and Scripting

Ssh bash script exits without remote command completion

Hi, My goal is to connect from unix server A to windows server B and call a bat file on windows. I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success. Can you please help me in... (4 Replies)
Discussion started by: pxp018
4 Replies

8. Shell Programming and Scripting

Script exits when using UNIX2dos / dos2UNIX

I'm not sure why but my script quits automatically at the point where unix2dos / dos2unix command is used. :confused::confused::confused: How do a fix it? LOG_FILE=MADDY.txt unix2dos ${LOG_FILE} exec 2> $LOG_FILE 1>&2 echo ${LOG_FILE} The script exists after the below... (3 Replies)
Discussion started by: machomaddy
3 Replies

9. UNIX for Beginners Questions & Answers

Script to check if files exits

Hi In live system core files are generating frequently. around 10 core files in 30 mins in root file system. which is eating my space very much below is core file core.56539 core.78886 core.12302 core.80554 core.20147 I am trying to write a script which should move... (7 Replies)
Discussion started by: scriptor
7 Replies

10. UNIX for Beginners Questions & Answers

Bash script to compare file all the files exits or not

Currently i am building a script like based on region parameter it will filter the records in config file and then it will create a text file like ab.txt and it will read the path location in that file and now i need to compare the files name in the config file to files in the path of the config... (1 Reply)
Discussion started by: saranath
1 Replies
iprsetup(8)						      System Manager's Manual						       iprsetup(8)

NAME
iprsetup - Internet Protocol router setup SYNOPSIS
/usr/sbin/iprsetup -s /usr/sbin/iprsetup -sd /usr/sbin/iprsetup -r /usr/sbin/iprsetup -rd /usr/sbin/iprsetup -fvalue /usr/sbin/iprsetup -fvalued /usr/sbin/iprsetup -d OPTIONS
Sets ipforwarding and ipgateway to one, which means the system functions as an IP router. This option cannot be combined with the -r option. Resets ipforwarding and ipgateway to zero, which means the system does not function as an IP router. This option cannot be com- bined with the -s and -f options. Sets ipforwarding and ipgateway to one (like the -s option), and also sets ipfirewall to one, which means the system functions as an IP firewall. Additionally, sets ipsrcroute and ipchkredirects according to the specified value. The fol- lowing table shows the valid values and their meaning: ---------------------------------------------------------- Value Meaning ---------------------------------------------------------- 0 Sets both ipsrcroute and ipchkredirects to zero 1 Sets ipsrcroute to zero and ipchkredirects to one 2 Sets ipsrcroute to one and ipchkredirects to zero 3 Sets both ipsrcroute and ipchkredirects to one ---------------------------------------------------------- This option cannot be combined with the -r option. Only application gateways for firewall services use this option. Displays the values of ipforwarding and ipgateway. The values are displayed after the values are changed when combined with the -s, -r, and -f options. DESCRIPTION
The iprsetup command sets the ipgateway and ipforwarding variables in the running kernel allowing your system to function as an Internet Protocol router. When ipfirewall variable is set to one, the following variables are also set: Indicates whether IP source-routed packets are accepted (1) or dropped immediately (0). Indicates whether ICMP Redirect messages are authenticated (1) or accepted with no authentication (0). The iprsetup command is automatically executed by netsetup when you configure your network daemons. It is also executed by the /sbin/init.d/inet script when you reboot your system or restart the network on your system. FILES
Contains the /usr/sbin/iprsetup command Contains the /usr/sbin/iprsetup command SEE ALSO
Network Administration iprsetup(8)
All times are GMT -4. The time now is 07:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy