Re: [OT] Does ~ always point to $HOME?

2007-01-27 Thread Matthew Seaman
Bill Campbell wrote: On Fri, Jan 26, 2007, James Long wrote: Message: 24 Date: Fri, 26 Jan 2007 09:22:44 -0800 From: Bill Campbell [EMAIL PROTECTED] Subject: Re: [OT] Does ~ always point to $HOME? To: freebsd-questions@freebsd.org, Bill Campbell [EMAIL PROTECTED] Message-ID: [EMAIL

Re: [OT] Does ~ always point to $HOME?

2007-01-27 Thread Bill Campbell
On Sat, Jan 27, 2007, Matthew Seaman wrote: Bill Campbell wrote: ... Probably the most portable way to do this would be to use awk. A simple script, homedir, might look like this: #!/bin/sh # getting the backwhacks correct is sometimes ``interesting'' homedir=`awk -F: /^$1:/{print \\$6}

Re: [OT] Does ~ always point to $HOME?

2007-01-27 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Campbell wrote: On Sat, Jan 27, 2007, Matthew Seaman wrote: Bill Campbell wrote: ... Probably the most portable way to do this would be to use awk. A simple script, homedir, might look like this: #!/bin/sh # getting the backwhacks

Re: [OT] Does ~ always point to $HOME?

2007-01-27 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matthew Seaman wrote: Bill Campbell wrote: On Fri, Jan 26, 2007, James Long wrote: Message: 24 Date: Fri, 26 Jan 2007 09:22:44 -0800 From: Bill Campbell [EMAIL PROTECTED] Subject: Re: [OT] Does ~ always point to $HOME? To: freebsd-questions

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread Karol Kwiatkowski
Bill Campbell wrote: On Fri, Jan 26, 2007, Dak Ghatikachalam wrote: I write shells script extensively , I have noticed ~ - gets a subsitution for $HOME ~userid - gets you the $HOME for that user meaning if you have have logged in as root and if you want to run some script on

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread Joerg Pernfuss
On Fri, 26 Jan 2007 15:21:14 +0100 Karol Kwiatkowski [EMAIL PROTECTED] wrote: While that's true for most shells, bash, csh, tcsh, etc., it doesn't work on true Bourne /bin/sh shells (e.g. SCO OpenServer 5.0.6a and earlier and probably others with Bell Labs ancestors). Not sure what I'm

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread Bill Campbell
On Fri, Jan 26, 2007, Joerg Pernfuss wrote: On Fri, 26 Jan 2007 15:21:14 +0100 Karol Kwiatkowski [EMAIL PROTECTED] wrote: While that's true for most shells, bash, csh, tcsh, etc., it doesn't work on true Bourne /bin/sh shells (e.g. SCO OpenServer 5.0.6a and earlier and probably others with

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread youshi10
On Fri, 26 Jan 2007, Joerg Pernfuss wrote: On Fri, 26 Jan 2007 15:21:14 +0100 Karol Kwiatkowski [EMAIL PROTECTED] wrote: While that's true for most shells, bash, csh, tcsh, etc., it doesn't work on true Bourne /bin/sh shells (e.g. SCO OpenServer 5.0.6a and earlier and probably others with

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread James Long
Message: 24 Date: Fri, 26 Jan 2007 09:22:44 -0800 From: Bill Campbell [EMAIL PROTECTED] Subject: Re: [OT] Does ~ always point to $HOME? To: freebsd-questions@freebsd.org, Bill Campbell [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii My

Re: [OT] Does ~ always point to $HOME?

2007-01-26 Thread Bill Campbell
On Fri, Jan 26, 2007, James Long wrote: Message: 24 Date: Fri, 26 Jan 2007 09:22:44 -0800 From: Bill Campbell [EMAIL PROTECTED] Subject: Re: [OT] Does ~ always point to $HOME? To: freebsd-questions@freebsd.org, Bill Campbell [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type

[OT] Does ~ always point to $HOME?

2007-01-25 Thread youshi10
Hello again, I'm revising some documentation that has examples of running Unix commands and I want to make sure that my steps are correct, such that I can substitute the tilde character ('~') for $HOME. The only issue I can see with this is an improper configuration with sudo (ran into

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread Bill Campbell
On Thu, Jan 25, 2007, [EMAIL PROTECTED] wrote: Hello again, I'm revising some documentation that has examples of running Unix commands and I want to make sure that my steps are correct, such that I can substitute the tilde character ('~') for $HOME. The only issue I can see with

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread youshi10
On Thu, 25 Jan 2007, Bill Campbell wrote: On Thu, Jan 25, 2007, [EMAIL PROTECTED] wrote: Hello again, I'm revising some documentation that has examples of running Unix commands and I want to make sure that my steps are correct, such that I can substitute the tilde character ('~') for

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread Dak Ghatikachalam
I write shells script extensively , I have noticed ~ - gets a subsitution for $HOME ~userid - gets you the $HOME for that user meaning if you have have logged in as root and if you want to run some script on oracle home even though you logged in as root you can simplly

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread Dak Ghatikachalam
On 1/26/07, Dak Ghatikachalam [EMAIL PROTECTED] wrote: I write shells script extensively , I have noticed ~ - gets a subsitution for $HOME ~userid - gets you the $HOME for that user meaning if you have have logged in as root and if you want to run some script on oracle home even

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread Bill Campbell
On Fri, Jan 26, 2007, Dak Ghatikachalam wrote: I write shells script extensively , I have noticed ~ - gets a subsitution for $HOME ~userid - gets you the $HOME for that user meaning if you have have logged in as root and if you want to run some script on oracle home even though you

Re: [OT] Does ~ always point to $HOME?

2007-01-25 Thread Dak Ghatikachalam
On 1/26/07, Bill Campbell [EMAIL PROTECTED] wrote: On Fri, Jan 26, 2007, Dak Ghatikachalam wrote: I write shells script extensively , I have noticed ~ - gets a subsitution for $HOME ~userid - gets you the $HOME for that user meaning if you have have logged in as root and if you want