[wplug] *.bat files

Jonathan S Billings billings at negate.org
Tue May 18 09:23:43 EDT 2004


It did change to that directory ... for that shell's session.  Remember,
shell scripts run with their own shell.  Your login session is running
under a completely different shell.  The CWD (current working directory)
of both of those shells are independant.  If you really want to create a
command that makes a directory, changes the CWD to that new directory
and clears the terminal, it might be easier done with a shell alias.


On Tue, 2004-05-18 at 08:54, Weber, Larry A wrote:
> Tried this batch file and found that it created a new directory and cleared
> the terminal.  Would not cd to the new directory????
> 
> > -----Original Message-----
> > From:	wplug-bounces+laweber=switch.com at wplug.org
> > [SMTP:wplug-bounces+laweber=switch.com at wplug.org] On Behalf Of Jason Carr
> > Sent:	Tuesday, May 18, 2004 8:06 AM
> > To:	'General user list'
> > Subject:	RE: [wplug] *.bat files
> > 
> > 1. Create a file called 'test.sh' and edit that file.
> > 2. The first line should say #!/bin/sh
> > 3. Put the rest of the commands on their own lines
> > 4. The result should be as follows:
> > 
> > #!/bin/sh
> > mkdir newfile
> > cd newfile
> > clear
> > 
> > The #!/bin/sh is which shell interpreter is used so you may need to change
> > that depending on which Linux distro you use.
> > 
> > 5. To make it executable, type chmod u+x test.sh
> > 6. Now you can type /home/jason/test.sh (or where ever it might be.
> > 
> > Any more questions, feel free to ask :)
> > 
> > - Jason
> > 
> > 
> > -----Original Message-----
> > From: wplug-bounces+jason=flacid.org at wplug.org
> > [mailto:wplug-bounces+jason=flacid.org at wplug.org] On Behalf Of Amjed Ben
> > Salah
> > Sent: Tuesday, May 18, 2004 7:59 AM
> > To: wplug at wplug.org
> > Subject: [wplug] *.bat files
> > 
> > Hello,
> > can someone tell me how to create files in linux like *.bat files in
> > MSDOS?
> > for example I want to create a program who does this:
> > 
> > 1 $> mkdir newfile
> > 2 $>cd newfile
> > 3 $>clear
> > 
> > regards
> > _____________________________________________________________________
> > Endlich SMS mit Bildern versenden! Das Bild selbst ist dabei gratis,
> > Sie bezahlen lediglich den Versand. http://freemail.web.de/?mc=021195
> > 
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> > 
> > 
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
-- 
Jonathan S Billings <billings at negate.org>




More information about the wplug mailing list