The entire point of the script is to dump me there so I can continue on doing stuff.
I have done some searching on the internet and found a way to make this happen. I was running my script with the following line: sh websites (websites being the filename) If I run it with the following command, it leaves me there when done: . websites (a dot before the name | websites still being the filename) Sometimes you just have to stumble on to an answer to figure it out. Thanks all for reading through. Jeff On 2011-03-17, at 12:35 PM, louie wrote: > You will be in /webserver/documents as long as the script is running. > On Mar 17, 2011, at 9:17 AM, Jeff Berwick wrote: > >> As said, I created the file. I chmod 755 so it is executable. I have added >> an echo line which tells me the script is executing fine. However, when the >> script is over I am left in the same directory - my ~jeff directory. Is >> there a reason why a script could not change to the mentioned directory? >> >> Thx, >> Jeff >> >> On 2011-03-17, at 12:11 PM, louie wrote: >> >>> Jeff, >>>> cd /library/webserver/documents >>> runs fine in terminal. >>> Give us a bit more details. >>> >>> On Mar 17, 2011, at 7:51 AM, Jeff Berwick wrote: >>> >>>> Hi all, >>>> >>>> I'm trying to create a unix executable file to change to a commonly used >>>> directory on my computer. I can't, however, get it to run. Can anybody >>>> assist? >>>> >>>> I have created a file that contains: >>>> >>>> ****** >>>> #/bin/bash >>>> cd /library/webserver/documents >>>> ***** >>>> >>>> I have also tried creating it without the #!/bin/bash line at the top. >>>> >>>> I have done a chmod 755 on the file but, I cannot get it to run. Are >>>> there any steps I am missing? >>>> >>>> Thx, >>>> Jeff >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "MacVisionaries" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> For more options, visit this group at >>>> http://groups.google.com/group/macvisionaries?hl=en. >>>> >>> >>> louie >>> [email protected] >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "MacVisionaries" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/macvisionaries?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "MacVisionaries" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/macvisionaries?hl=en. >> > > louie > [email protected] > > > > -- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/macvisionaries?hl=en. > -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/macvisionaries?hl=en.
