No subject


Fri Jan 31 06:23:24 EST 2014


>From suter  Mon Nov 26 13:29:36 2001
Return-Path: <majordom at caliburn.humbug.org.au>
Received: from diadora.client.uq.net.au (diadora-2 [10.0.1.2])
	by zwitterion.humbug.org.au (8.12.1/8.12.1/Debian -2) with ESMTP id fAQ3TZNT002389
	for <suter at zwitterion.humbug.org.au>; Mon, 26 Nov 2001 13:29:35 +1000
Received: from caliburn (mail at caliburn.humbug.org.au [203.15.51.6])
	by diadora.client.uq.net.au (8.12.1/8.12.1/Debian -2) with ESMTP id fAQ3TZ05020935
	for <suter at zwitterion.humbug.org.au>; Mon, 26 Nov 2001 13:29:35 +1000
Received: from majordom by caliburn with local (Exim 3.12 #1 (Debian))
	id 168CB0-00069u-00
	for <general-outgoing at lists.humbug.org.au>; Mon, 26 Nov 2001 13:11:22 +1000
Received: from mailin5.bigpond.com ([139.134.6.78])
	by caliburn with esmtp (Exim 3.12 #1 (Debian))
	id 168CAx-00069m-00
	for <general at lists.humbug.org.au>; Mon, 26 Nov 2001 13:11:20 +1000
Received: from EUMUNDI.mat-man.com.au ([144.135.24.75]) by
          mailin5.bigpond.com (Netscape Messaging Server 4.15) with SMTP
          id GNE15600.ABT for <general at lists.humbug.org.au>; Mon, 26 Nov
          2001 13:17:30 +1000 
Received: from 203.52.73.112 ([203.52.73.112]) by bwmam03.mailsvc.email.bigpond.com(MailRouter V2.9k 8323/20912641); 26 Nov 2001 13:10:43
Message-Id: <4.3.2.7.2.20011126130753.00b0d450 at mail.bigpond.com>
X-Sender: easo.thankachen at mat-man.com.au@mail.bigpond.com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Mon, 26 Nov 2001 13:09:54 +1000
To: general at lists.humbug.org.au
From: Easo Thankachen <easo.thankachen at mat-man.com.au>
Subject: [H-GEN] change directory shell script reverting to orginal directory
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Precedence: bulk
Reply-To: general at lists.humbug.org.au
X-Loop: general at lists.humbug.org.au
List-Help: <mailto:majordomo at lists.humbug.org.au?subject=help>
List-Post: <mailto:general at lists.humbug.org.au>
List-Subscribe: <mailto: general-request at lists.humbug.org.au?subject=subscribe>
List-Id: semi-serious discussions about Humbug and Unix-related topics <general at lists.humbug.org.au>
List-Unsubscribe: <mailto: general-request at lists.humbug.org.au?subject=unsubscribe>
List-Archive: <http://archive.humbug.org.au/humbug-general/>
Sender: Majordomo <majordom at caliburn.humbug.org.au>
Status: RO
Content-Length: 969
Lines: 35

[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

Hi,
i have this script to change to a directory and display the directory that 
it has changed to with some basic validations. But it display the correct 
directory and then reverts back to the directory the command was called.

------------------
$ more cwd
---------
#!/bin/sh
# change Directory and display the working directory
if [ $# -ne 0 ] ; then
   if [ -d $1 ] ; then
     cd $1 ;
   else
     echo "Directory $1 not found" ;
   fi
else
   echo
   echo "************* Arguments Expected *************"
fi
echo "Current Directory is `pwd`"
echo

Thanks,
ET 


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list