The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Simple Script mojoman Shell Programming and Scripting 6 05-12-2008 03:55 AM
simple script ali560045 Shell Programming and Scripting 1 01-22-2008 04:41 AM
Simple Script Help Skunkie UNIX for Dummies Questions & Answers 4 10-02-2006 11:18 AM
simple awk script... moxxx68 Shell Programming and Scripting 3 01-24-2005 04:17 AM
simple script hedrict UNIX for Dummies Questions & Answers 4 02-23-2004 04:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2007
mehmetned mehmetned is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 10
script for "cd" command

Hi,
I need a script which can apply 'cd' command .
for example there is a directory:

(myDirectory)

#cd myDirectory (current dir is myDirectory)


my script can do this:

#do (current dir is myDirectory) (do is my script)

Thanks.

Last edited by mehmetned; 02-09-2007 at 08:38 AM.. Reason: an error
  #2 (permalink)  
Old 02-09-2007
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
Put the line

cd myDirectory

inside your script, somewhere at the beginning, before you start to do what you really want to do
  #3 (permalink)  
Old 02-10-2007
srikanthus2002's Avatar
srikanthus2002 srikanthus2002 is offline
Registered User
  
 

Join Date: Sep 2006
Location: Can u guess...!
Posts: 160
Code:
myDirctory=/home/mydir    # your myDirectory path 
pwd                               #if you want to see a prasent workinng directory
my_script                        # your script name
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0