Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Where should I put the script? Post 302158307 by jurrien on Tuesday 15th of January 2008 02:43:03 AM
Old 01-15-2008
if i read correctly you have a script to start stop vnc yourself.

it depends on what kind of script it is.
and what unix enverioment you have.

but if it is a script that you want to start from commandline by ticking in one command
put it in a place where it is in your path.
use tjhe command "set" to see what enverioment variabled you have set
mostly places like /usr/local/bin will be in your path
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script is not working when put in crontab

Hi there, this is part of my script: /usr/bin/cd /u01/oradata /usr/bin/cp `/bin/ls -1 . |grep -v "^DIMStemp01.dbf$" | grep -v "^DIMSts01.dbf$"|grep -v "^DIMStects01.dbf$"` /backup It's working fine when I manually run on telnet session. /bin/ls -1 . -- to list all the files inside... (2 Replies)
Discussion started by: *Jess*
2 Replies

2. Solaris

how to put script in startup

Hi All, O/S: Solaris 5.10 Software installed :- Oracle 10G Weblogic 10.30 the problem i face that when the server restart for any reason SQL> exit bash-3.00# sqlplus sys/manchester as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010 Copyright (c)... (3 Replies)
Discussion started by: xxmasrawy
3 Replies

3. Shell Programming and Scripting

Could I put this into a case script instead?

Hi guys, I have a script which clears down a range of directories, however it can take a while to run. Is there a way I can simplify the below, perhaps adding it into a case statement? client_directories=/usr/local/production/cleanup/bin/client_cleanups/client_directories.txt # clear down... (2 Replies)
Discussion started by: JayC89
2 Replies

4. Programming

How to put variable date from SQL Script

Hi Guys, Can someone please help me on adding/inserting a variable to an sql scipt? Basically I want to assign today's date. As shown below.. set head off; set linesize 300; set pagesize 200; spool /opt/oracle/temp/output.txt select value,count(*) as totalcount from pmowner.pinpebasev... (11 Replies)
Discussion started by: pinpe
11 Replies

5. Shell Programming and Scripting

Script required to put colon

Hi Expert, I need help on script to put colon between two characters. From this line 60060160B18414009C557D9DE02CDF11 to this 60:06:01:60:B1:84:14:00:9C:55:7D:9D:E0:2C:DF:11 Any way to make it on script. (2 Replies)
Discussion started by: ranjancom2000
2 Replies

6. Shell Programming and Scripting

how to put into logs the exact doing of script!

Hi All, I'm a newbie here, I'm just wondering how can i put into the logs of the exact doing of script. ex.: test1.sh abcd@10.226.144.180's password: 20111102 17:20:02 || FILE FOUND IN ICCBS SERVER 20111102 17:20:02 || ACCESS ICCBS SERVER TO GET FILES Connecting to 10.226.144.180...... (1 Reply)
Discussion started by: nikki1200
1 Replies

7. UNIX for Dummies Questions & Answers

put script into file

hi, ok having here some code like: #!/bin/bash echo " hello " # say hello to the user echo " $HOME " echo " $HOSTNAME " echo " $(uname) " echo " today is $(date) " echo " $(whoami) is currently logged in " now my question is how to change the code so that the info is not... (12 Replies)
Discussion started by: me.
12 Replies

8. Shell Programming and Scripting

Put Script on Start-up the sh Terminal

Hi all I want to put this script on start-up the sh Terminal to save history of output: if ; then logdir=$HOME/terminal-logs if ; then mkdir $logdir fi gzip -q $logdir/*.log logfile=$logdir/$(date +%F_%T).$$.log ... (12 Replies)
Discussion started by: Rahim_T
12 Replies

9. Shell Programming and Scripting

Put currently running script into background

Hi All, Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals. I tried: #!/bin/bash echo "" > test_disown mypid=$$ echo "PID=$mypid" ( kill -SIGSTOP $mypid jobs > myjobs #disown -h <job-spec> #kill -SIGCONT $mypid )... (6 Replies)
Discussion started by: JackK
6 Replies

10. Red Hat

Where to put script to be executed before shutdown ?

Hello, My AIM is to run my script every time when someone shutdown or reboot my RHEL7 AWS instance. Query ) Where should i put my script .So, that it gets automatically executed when a server is going down or reboot ? (3 Replies)
Discussion started by: saurabh84g
3 Replies
SERVICE(8)						      System Manager's Manual							SERVICE(8)

NAME
service - run a System V init script SYNOPSIS
service SCRIPT COMMAND [OPTIONS] service --status-all service --help | -h | --version DESCRIPTION
service runs a System V init script or systemd unit in as predictable an environment as possible, removing most environment variables and with the current working directory set to /. The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT, or the name of a systemd unit. The existence of a systemd unit of the same name as a script in /etc/init.d will cause the unit to take precedence over the init.d script. The supported val- ues of COMMAND depend on the invoked script. service passes COMMAND and OPTIONS to the init script unmodified. For systemd units, start, stop, status, and reload are passed through to their systemctl/initctl equivalents. All scripts should support at least the start and stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start command. service --status-all runs all init scripts, in alphabetical order, with the status command. The status is [ + ] for running services, [ - ] for stopped services and [ ? ] for services without a status command. This option only calls status for sysvinit jobs. EXIT CODES
service calls the init script and returns the status returned by it. FILES
/etc/init.d The directory containing System V init scripts. /{lib,run,etc}/systemd/system The directories containing systemd units. ENVIRONMENT
LANG, LANGUAGE, LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEA- SUREMENT, LC_IDENTIFICATION, LC_ALL, TERM, PATH The only environment variables passed to the init scripts. SEE ALSO
/etc/init.d/skeleton update-rc.d(8) init(8) invoke-rc.d(8) systemctl(1) AUTHOR
Miloslav Trmac <mitr@redhat.com>, Petter Reinholdtsen <pere@hungry.com> Licence: GNU Public Licence v2 (GPLv2) COPYRIGHT
2006 Red Hat, Inc., Petter Reinholdtsen <pere@hungry.com> Jan 206 SERVICE(8)
All times are GMT -4. The time now is 05:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy