Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Made command into a script but now won't run Post 302121395 by patwa on Wednesday 13th of June 2007 03:22:22 PM
Old 06-13-2007
Made command into a script but now won't run

Hello,

After seeing in a Unix cheatsheet that I could add commands into a file and run that file as a command to save on typing, i tried it with this:

Code:
#! /bin/csh
# Backup website excluding directories that do not change
rsync -e "ssh -p 2222" -axzvc --progress --stats --compress-level=9 patwa@patwanet.co.uk:/home/patwa --exclude=/home/patwa/public_html/dl --exclude=/home/patwa/public_html/jithwish --exclude/home/patwa/public_html/senaka /home/H/HGBackup13062007 ; sync

I gave it a chmod of 755 and no file extension but when I try to run it I get 'Command not found'. The file was placed in my cygwin home directory.

I can run the actual rsync command if I type it longhand with no problem.

Could someone advise what I'm doing wrong?

Thanks.

H.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why won't my script run?

On the following script that I get an error when I try to execute as root: #./mv_log.sh bash: /root/util/mv_log.sh: Permission denied #!/usr/bin datetag=`date --date='1 day ago' +"%b%d%Y"` logname=`find /opt/bea/wlserver6.1/config/*/logs/ -iname 'access.log0*' -mtime -1 -print` mv... (4 Replies)
Discussion started by: darthur
4 Replies

2. UNIX for Dummies Questions & Answers

Cron won't run properly

I am new to unix, and this is my 1st post on this board. Looking for some advice about a cron job in my server. I am running a cron task that references a script which runs several other scripts and compiles them into a report and emails it to me. If I run the script manually, I will... (2 Replies)
Discussion started by: Steeler_fan
2 Replies

3. Solaris

smc won't run on a regular user

Hi All, I'm getting this all the time with a regular user (after I do su - and smc): It appears you are attempting to run the graphical Solaris Management Console from a terminal which does not have a suitable 'DISPLAY' environment. Please check your 'DISPLAY' settings and that the user... (5 Replies)
Discussion started by: itik
5 Replies

4. Ubuntu

Toshiba Laptop Won't Run Bluetooth with Ubuntu

I am running Ubuntu 8.1 on a Toshiba Satellite P105-S9337 with built-in Bluetooth hardware. I cannot get the Bluetooth hardware to work with my Microsoft Bluetooth mouse. I have installed the tosh software with no luck. Does anyone have an idea as to what to try. I have several kernel mods... (0 Replies)
Discussion started by: tjloeb
0 Replies

5. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

6. Solaris

SunFire V440 Quad gigabit ce1 won't run Gig

Hi there. My first time posting so apologies for any indescretions in advance. :o I've got two SunFire V440 servers running Solaris 5v10. Both have a quad Gigabit ethernet card fitted, both have the same symptom; that is, I can't get the first port ce1 to run Gigabit. Motherboard ports are ce0 and... (10 Replies)
Discussion started by: fixit9660
10 Replies

7. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 1.1.1.1 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

8. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

9. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies

10. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
rc2(8)							      System Manager's Manual							    rc2(8)

NAME
rc2 - Run command script executed when entering a multiuser run level SYNOPSIS
rc2 DESCRIPTION
The rc2 script contains run commands that enable initialization of the system to a multiuser state; run level 2. In addition to commands listed within the script itself, rc2 contains instructions to run certain commands found in the /sbin/rc2.d directory. The script defines the conditions under which the commands execute; some commands run if the system is booting, other commands execute if the system is chang- ing run levels. By convention, files in the /sbin/rc2.d directory begin with either the letter "K" or the letter "S" and are followed by a two-digit number and a filename; for example: K00lpd S00savecore S25uucp In general, the system starts commands that begin with the letter "S" and stops commands that begin with the letter "K." Commands that begin with the letter "K" run only when the system is changing run levels from a higher to a lower level. Commands that begin with the letter "S" run in all cases. The numbering of commands in the /sbin/rc2.d directory is important since the numbers are sorted and the com- mands are run in ascending order. Files in the /sbin/rc2.d directory are normally links to files in the /etc/init.d directory. An entry in the inittab file causes the system to execute the rc2 run commands, for example: s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1 The following operations are typical of those that result from executing the rc2 script and the commands located in the /sbin/rc2.d direc- tory. The operation depends on which state the system is entering or exiting. Setting the time zone Checking the current run level Stop- ping network services and daemons Starting (or stopping) system services and daemons Starting the cron daemon Setting up paging and dump facilities Setting up uucp files Setting the TIMEZONE variable is one of the first operations completed by the rc2 script. This action provides the default time zone for subsequent commands. FILES
Specifies the command path Specifies the directory of commands that correspond to the run level RELATED INFORMATION
Commands: init(8), rc0(8), rc3(8) delim off rc2(8)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy