Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OT] Bash scripting
Date: Sat, 12 Nov 2005 01:27:17
Message-Id: f4b4c8277f89bacc5eb68a92845dc432@stellar.eclipse.co.uk
In Reply to: [gentoo-user] Re: [OT] Bash scripting by Peper
1 On Nov 11, 2005, at 2:12 pm, Peper wrote:
2
3 > And one more thing, is there any smarter way to read one line of file
4 > then
5 > head -n x file|tail -n 1 ?
6
7 Surely so:
8
9 $ echo 'blahpath="/path/to/blahdir"' >> configfile
10 $ echo $blahpath
11
12 $ source configfile
13 $ echo $blahpath
14 /path/to/blahdir
15 $ blahpath=$blahpath/foo
16 $ echo $blahpath
17 /path/to/blahdir/foo
18 $
19
20 Stroller.
21
22 --
23 gentoo-user@g.o mailing list