Gentoo Archives: gentoo-user

From: Renat Golubchyk <ragermany@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sudo echo
Date: Fri, 24 Mar 2006 00:15:38
Message-Id: 20060324005809.3dfc2101@mating-tux.renatik.de
In Reply to: Re: [gentoo-user] sudo echo by David Morgan
1 On Thu, 23 Mar 2006 23:12:38 +0000 David Morgan
2 <david.morgan@××××××××××××××××.uk> wrote:
3 > On 23:38 Thu 23 Mar , Renat Golubchyk wrote:
4 > > Careful with those quotation marks - you might want to escape
5 > > them ;-) I would use single quotes on the outside to avoid the
6 > > confusion:
7 > >
8 > > sudo 'echo "app-portage/porthole ~*"
9 > > >> /etc/portage/package.keywords'
10 > >
11 >
12 >
13 > Do that and it'll say
14 >
15 > sudo: echo "app-portage/porthole ~*"
16 > >> /etc/portage/package.keywords: command not found
17 >
18 > This has been discussed on here before.
19 >
20 > The problem is that if you do `sudo echo foo > bar`, the echo is being
21 > run as root, but the writing to bar isn't.
22
23 Alright, then run
24 sudo bash -c 'echo some_string >> some_file'
25 No problem here :)
26
27
28 Cheers,
29 Renat
30
31 --
32 Probleme kann man niemals mit derselben Denkweise loesen,
33 durch die sie entstanden sind.
34 (Einstein)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] sudo echo Neil Bothwick <neil@××××××××××.uk>