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
shell script command lg123 UNIX and Linux Applications 3 04-11-2008 03:35 AM
Use ftp command in shell script infyanurag Shell Programming and Scripting 3 02-05-2008 08:06 AM
cd command is not working in my shell script amitrajvarma Shell Programming and Scripting 3 10-03-2007 05:04 AM
vi command in shell script bryan UNIX for Dummies Questions & Answers 2 05-23-2006 07:51 PM
Shell script command dipanrc Shell Programming and Scripting 7 11-29-2005 11:15 AM

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

Join Date: Mar 2007
Posts: 38
how to use cd command in shell script

hi
buddies

i am not getting this

when am using the cd command it is not working
for example

makefile.ksh
---------------
#!/bin/ksh
dirpath=$1
cd dirpath

my intension is to give the directory path as a parameter at runtime, so i have done like this but the path which i required is not getting.

plz help in this

with regards
narayana
  #2 (permalink)  
Old 09-09-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
ignore this

Last edited by porter; 09-09-2007 at 06:05 AM..
  #3 (permalink)  
Old 09-09-2007
LAKSHMI NARAYAN LAKSHMI NARAYAN is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 38
how to use cd command in shell script

i didn't get u
can u explain in detail
  #4 (permalink)  
Old 09-09-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by LAKSHMI NARAYAN View Post
#!/bin/ksh
dirpath=$1
cd dirpath
In your case, however you just need

Code:
#!/bin/ksh
dirpath=$1
cd $dirpath
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 09:15 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