Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: bash scripts: using ~<username>

  • Subject: Re: bash scripts: using ~<username>
  • From: Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>
  • Date: Mon, 25 Sep 2006 12:46:17 +0100
  • Newsgroups: comp.os.linux.misc
  • Organization: schestowitz.com / ISBE, Manchester University / ITS / Netscape / MCC
  • References: <450db030$0$75040$14726298@news.sunsite.dk> <slrnegrco0.huh.danSPANceswithTRAPcrows@clairissa.localdomain>
  • Reply-to: newsgroups@xxxxxxxxxxxxxxx
  • User-agent: KNode/0.7.2
__/ [ Dances With Crows ] on Sunday 17 September 2006 21:43 \__

> ["Followup-To:" header set to comp.os.linux.misc.]
> Angel Tsankov staggered into the Black Sun and said:
>> When typed at the bash prompt, ~<username> is expanded to the home
>> directory of the specified user. [Why can'] I use this construct in
>> scripts? Or, if I can, then how?
> 
> Works for me:
> 
> clairissa:~$ cat temp.sh
> #!/bin/bash
> cd ~guest
> pwd
> clairissa:~$ ./temp.sh
> /home/guest
> 
> ...maybe you'd better post an example of how it doesn't work for you,
> with the exact command that's getting executed.  Remember, when
> debugging shell scripts, "set -x" can give you a whole lot of
> information.

Either it's a hit-and-run poster or, judging by the headers, it's a troll.

__/ [ Angel Tsankov ] on Sunday 17 September 2006 21:28 \__

> X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
> Message-ID: <450db030$0$75040$14726298@xxxxxxxxxxxxxxx>
> Organization: SunSITE.dk - Supporting Open source
> X-Trace: news.sunsite.dk

I hope I don't let the guillotine fly prematurely, but these headers remind
me of a Danish poster that sent some fake problems to annoy folks in various
NG's including COLA. He returned to mis mischiefs quite recently as well.

Best wishes,

Roy

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index