what would have been batch files!

what would have been batch files!

Post by neil » Wed, 02 Apr 2003 08:13:48



Hi

I need a shell script to automate samba start/stop

essentially i want to be able to run the commands
# /etc/init.d/smb start & stop
as desktop icons

I can do this sort of thing in DOS!!

man bash might as well be in Latin!

Thanks

 
 
 

what would have been batch files!

Post by nobodadd » Wed, 02 Apr 2003 10:35:53



> Hi

> I need a shell script to automate samba start/stop

> essentially i want to be able to run the commands
> # /etc/init.d/smb start & stop
> as desktop icons

> I can do this sort of thing in DOS!!

> man bash might as well be in Latin!

> Thanks

cogito ergo bashum

$ cat sambastart
#! /bin/bash
/etc/init.d/smb start

$ cat sambastop
#! /bin/bash
/etc/init.d/smb stop

quod erat demonstratum

post scriptum:

$ info bash

http://www.tldp.org/LDP/abs/html/index.html

--
The other day a dog peed on me.  A bad sign.
- H.L. Mencken

 
 
 

what would have been batch files!

Post by neil » Wed, 02 Apr 2003 21:32:04


Thank you kind sir (particularly for the URL)
Oh the joys of a totally new OS!!!



> > Hi

> > I need a shell script to automate samba start/stop

> > essentially i want to be able to run the commands
> > # /etc/init.d/smb start & stop
> > as desktop icons

> > I can do this sort of thing in DOS!!

> > man bash might as well be in Latin!

> > Thanks

> cogito ergo bashum

> $ cat sambastart
> #! /bin/bash
> /etc/init.d/smb start

> $ cat sambastop
> #! /bin/bash
> /etc/init.d/smb stop

> quod erat demonstratum

> post scriptum:

> $ info bash

> http://www.tldp.org/LDP/abs/html/index.html

> --
> The other day a dog peed on me.  A bad sign.
> - H.L. Mencken

 
 
 

1. Batch Files: Why is it the only the last line of the batch files is executing?

I am trying to write a batch file which changes some file attributes
using chmod

the batch file is as follows:

  chmod u+r, g+r o+r sample1.jsp
  chmod u+r, g+r o+r sample2.jsp
  chmod u+r, g+r o+r sample3.jsp
  chmod u+r, g+r o+r sample4.jsp

When I run the batch file using the "sh" command, the only line which
is executed is the last one. For the first 3 lines I receive the
following error:

chmod: Can't access sample1.jsp
chmod: Can't access sample2.jsp
chmod: Can't access sample3.jsp

Any ideas on what is going on and how to correct this. I am a UNIX
newbie.

- jos

2. Upgrading RH5.0

3. I already RTFM, but am still having problems

4. cdrom disappears with devfs

5. I am having trouble with tcpip

6. DE-660 PCMCIA Network Card

7. I am having problems with "fvwm2" or Xwindows

8. dhcrelay + ipchains - redirection - please email

9. I am having trouble rebuilding xchat

10. I am having problems with the 3c905 and the 3c509b with RH 5.0

11. Stupid $PATH question that I am ashamed to ask, but having no pride, I proceed

12. I am having troubles installing StarOffice 5.2 from the RedHat 7.2 distribution

13. I am having a /proc problem.