Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread François-Xavier CARTON
Le 22/01/2019 à 03:05, François-Xavier CARTON a écrit : Le 22/01/2019 à 00:50, Adam Carter a écrit : I need to clean up a file which has IP addresses with leading zeros in some of the octets so I need to make, say, .09 into .9 How do i do that in sed/awk/whatever? I believe that should do:

Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread François-Xavier CARTON
Le 22/01/2019 à 00:50, Adam Carter a écrit : I need to clean up a file which has IP addresses with leading zeros in some of the octets so I need to make, say, .09 into .9 How do i do that in sed/awk/whatever? I believe that should do: sed 's/0*\([0-9]\)/\1/g' eg. $ sed

Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread Andrew Udvare
On 21/01/2019 18:50, Adam Carter wrote: > I need to clean up a file which has IP addresses with leading zeros in > some of the octets so I need to make, say, .09 into .9 > > How do i do that in sed/awk/whatever? A regex would be difficult. Parser is what you want. You could use Python's

Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread Grant Taylor
On 1/21/19 5:02 PM, Michael Orlitzky wrote: You need a parser, not a regular expression. The first thing that came to mind is splitting the values and passing them through printf. (You can do it with a regex, but it's going to be one of those comical twelve-page-long things.) I don't

Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread Michael Orlitzky
On 1/21/19 6:50 PM, Adam Carter wrote: I need to clean up a file which has IP addresses with leading zeros in some of the octets so I need to make, say, .09 into .9 How do i do that in sed/awk/whatever? The first thing you should do is construct a bunch of test cases, with all of the

[gentoo-user] OT scripting - strip zero if between period and digit

2019-01-21 Thread Adam Carter
I need to clean up a file which has IP addresses with leading zeros in some of the octets so I need to make, say, .09 into .9 How do i do that in sed/awk/whatever?

[gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Nikos Chantziaras
On 21/01/2019 20:25, Jacques Montier wrote: Le lun. 21 janv. 2019 à 19:04, Nikos Chantziaras > a écrit : I can't see why "emerge -uv bash" would ever invoke sudo. So I'd say that you should first find out what command is being executed with sudo. To do

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jack
On 2019.01.21 13:41, Jacques Montier wrote: Le lun. 21 janv. 2019 à 19:19, Jack a écrit : > > I have a suspicion that this really might be sandbox related. > /dev/fd/whatever are all in the live system, and if I understand > correctly, emerge works within the sandbox, so you should not be

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 19:19, Jack a écrit : > > I have a suspicion that this really might be sandbox related. > /dev/fd/whatever are all in the live system, and if I understand > correctly, emerge works within the sandbox, so you should not be able > to get at those files (certainly not write

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 19:04, Nikos Chantziaras a écrit : > > I can't see why "emerge -uv bash" would ever invoke sudo. So I'd say > that you should first find out what command is being executed with sudo. > To do that, try to emerge bash, and when the sudo prompt pops up, switch > to another

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jack
On 2019.01.21 11:44, Jacques Montier wrote: Le lun. 21 janv. 2019 à 15:37, Alexander Kapshuk < alexander.kaps...@gmail.com> a écrit : > > (1). Are you attempting to build bash as yourself or as user root? > (2). If the latter, what's in LD_PRELOAD and LD_LIBRARY_PATH? > > (3). What's the output

[gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Nikos Chantziaras
On 19/01/2019 12:51, Jacques Montier wrote: I did not have any problem with bash emerge so far. Here is the attached log. As usual, i successfully logged with my root password (su -) and then #emerge -uv bash The only thing i did some days ago, was to change my user jacques password. In the

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Alexander Kapshuk
On Mon, Jan 21, 2019 at 3:43 PM Jacques Montier wrote: > > > Le lun. 21 janv. 2019 à 14:16, Alexander Kapshuk > a écrit : >> >> >> >> What is the output of: >> env | grep libsandbox.so >> > > There is no output of env | grep libsandbox.so, but with env | grep sandbox, > i get this : > > $ env

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 14:16, Alexander Kapshuk < alexander.kaps...@gmail.com> a écrit : > > > What is the output of: > env | grep libsandbox.so > > There is no output of env | grep libsandbox.so, but with env | grep sandbox, i get this : $ env | grep sandbox

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Alexander Kapshuk
On Mon, Jan 21, 2019 at 3:03 PM Jacques Montier wrote: > > Le lun. 21 janv. 2019 à 13:04, Alexander Kapshuk > a écrit : >> >> >> >> What is the output of: >> echo $LD_PRELOAD >> echo $LD_LIBRARY_PATH >> > > No output. > > -- > Jacques > So these variables are both unset. But the build log you

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 13:04, Alexander Kapshuk < alexander.kaps...@gmail.com> a écrit : > > > What is the output of: > echo $LD_PRELOAD > echo $LD_LIBRARY_PATH > > No output. -- Jacques

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Alexander Kapshuk
On Mon, Jan 21, 2019 at 1:31 PM Jacques Montier wrote: > > > > Le lun. 21 janv. 2019 à 12:11, Alexander Kapshuk > a écrit : > >> >> The /proc/PID directory listed by the ls command is the directory for >> the process that executed the ls command. See below. >> >> % ls -ld /proc/self & >> [1]

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 12:11, Alexander Kapshuk < alexander.kaps...@gmail.com> a écrit : > The /proc/PID directory listed by the ls command is the directory for > the process that executed the ls command. See below. > > % ls -ld /proc/self & > [1] 27318 > % lrwxrwxrwx 1 root root 0 Sep 24 14:06

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Alexander Kapshuk
On Mon, Jan 21, 2019 at 12:52 PM Jacques Montier wrote: > > > Le lun. 21 janv. 2019 à 11:21, Raffaele Belardi a > écrit : >> >> >> Well, they are owned by jacques instead of root. Could it be the reason why >> you're asked >> for a password? Maybe some strange interaction with the sandbox? >>

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 11:21, Raffaele Belardi a écrit : > > Well, they are owned by jacques instead of root. Could it be the reason > why you're asked > for a password? Maybe some strange interaction with the sandbox? > > raffaele > Yes, i noticed that, but how to explain my root password

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Raffaele Belardi
Jacques Montier wrote: > / > / > Le lun. 21 janv. 2019 à 07:52, Raffaele Belardi > a écrit : > > Jacques Montier wrote: > > checking whether /dev/fd is available... ERROR: ld.so: object > 'libsandbox.so' from > LD_PRELOAD cannot be preloaded (cannot

Re: [gentoo-user] Re: bash upgrading problem

2019-01-21 Thread Jacques Montier
Le lun. 21 janv. 2019 à 07:52, Raffaele Belardi a écrit : > Jacques Montier wrote: > > checking whether /dev/fd is available... ERROR: ld.so: object > 'libsandbox.so' from LD_PRELOAD cannot be preloaded (cannot open shared > object file): ignored. > > Just a guess. configure here is trying to