>> It seems that either will do the job, I'm just wondering (for the
>> purpose of my own "betterment" and improved knowledge of shell scripting
>> *grin*) about advantages of either approach. The only one I've come
>> with so far is that Solution 2 requires a separate process to run.
>
>So does
On Wed, 24 Aug 2005, Cole Tuininga wrote:
> It seems that either will do the job, I'm just wondering (for the
> purpose of my own "betterment" and improved knowledge of shell scripting
> *grin*) about advantages of either approach. The only one I've come
> with so far is that Solution 2 requires
On Wed, 24 Aug 2005, Cole Tuininga wrote:
>
> Ok - I'm sure the answer to this is simple, but I can't seem to figure
> the darned thing out. In my defense, it's extremely rare that I do any
> shell scripting. 8)
>
> Basically, the deal is that I have a variable that contains a string
> such as
On Wednesday, Aug 24th 2005 at 10:32 -0400, quoth Cole Tuininga:
=>I've received two different responses to this request - both of which
=>seem to work just fine. My thanks to those who responded. I'm a little
=>curious if one solution has any advantages over the other:
=>
=>Solution 1:
=>
=>use
On Wed, 2005-08-24 at 10:06 -0400, Bill Sconce wrote:
> On Wed, 24 Aug 2005 09:43:46 -0400
> Cole Tuininga <[EMAIL PROTECTED]> wrote:
>
> >
> > Ok - I'm sure the answer to this is simple, but I can't seem to figure
> > the darned thing out. In my defense, it's extremely rare that I do any
> > sh
On Wed, 2005-08-24 at 10:32 -0400, Cole Tuininga wrote:
> I've received two different responses to this request - both of which
> seem to work just fine. My thanks to those who responded. I'm a little
> curious if one solution has any advantages over the other:
>
> Solution 1:
>
> user="usernam
I've received two different responses to this request - both of which
seem to work just fine. My thanks to those who responded. I'm a little
curious if one solution has any advantages over the other:
Solution 1:
user="username"
f=`eval "echo ~${user}"`
Solution 2:
user="username"
f=`getent p
Somthing like this perhaps?
$ user="quantum"
$ f=`getent passwd $user|cut -f6 -d:`
$ echo $f
/home/quantum
Cole Tuininga wrote:
Ok - I'm sure the answer to this is simple, but I can't seem to figure
the darned thing out. In my defense, it's
Cole Tuininga writes:
> In other words, if I have something like:
>
> user="username"
> f="~${user}"
>
> I'd like $f to end up with the path to username's actual home. As it
> is, it just has the value "~username". What magic do I need to do on my
> f assignment line?!
user=username
f=`eval ec
On Wed, 24 Aug 2005 09:43:46 -0400
Cole Tuininga <[EMAIL PROTECTED]> wrote:
>
> Ok - I'm sure the answer to this is simple, but I can't seem to figure
> the darned thing out. In my defense, it's extremely rare that I do any
> shell scripting. 8)
It IS grungier than Python, eh?
> Basically,
Ok - I'm sure the answer to this is simple, but I can't seem to figure
the darned thing out. In my defense, it's extremely rare that I do any
shell scripting. 8)
Basically, the deal is that I have a variable that contains a string
such as "~username". I'd like to actually expand that to the us
11 matches
Mail list logo