sed

sed

am 04.04.2008 23:38:12 von wtree

echo $(uname -m | sed -e s/i.86/i386/ )

produces i386 on one fedora installation but no output on another. It
appears to be a problem with the sed command. Bash shell on
both. ????

Re: sed

am 05.04.2008 00:11:58 von Bill Marcum

On 2008-04-04, wtree@imagic-inc.com wrote:
>
>
> echo $(uname -m | sed -e s/i.86/i386/ )
>
> produces i386 on one fedora installation but no output on another. It
> appears to be a problem with the sed command. Bash shell on
> both. ????

Is one of the machines an x86-64? What is the output of "uname -m" on
each machine? By the way there's no need for the echo and $( ).

Re: sed

am 05.04.2008 18:02:58 von wtree

On Apr 4, 6:11 pm, Bill Marcum wrote:
> On 2008-04-04, wt...@imagic-inc.com wrote:
>
>
>
> > echo $(uname -m |sed-e s/i.86/i386/ )
>
> > produces i386 on one fedora installation but no output on another. It
> > appears to be a problem with thesedcommand. Bash shell on
> > both. ????
>
> Is one of the machines an x86-64? What is the output of "uname -m" on
> each machine? By the way there's no need for the echo and $( ).

uname -m output is i686 on both machines. The problem machine is an
AMD 64 x2. The sed command produces no output on this machine even
when called with the --version.

Re: sed

am 06.04.2008 03:29:04 von Stan

wtree@imagic-inc.com wrote:
> On Apr 4, 6:11 pm, Bill Marcum wrote:
>> On 2008-04-04, wt...@imagic-inc.com wrote:
>>
>>
>>
>> > echo $(uname -m |sed-e s/i.86/i386/ )
>>
>> > produces i386 on one fedora installation but no output on another. It
>> > appears to be a problem with thesedcommand. Bash shell on
>> > both. ????
>>
>> Is one of the machines an x86-64? What is the output of "uname -m" on
>> each machine? By the way there's no need for the echo and $( ).
>
> uname -m output is i686 on both machines. The problem machine is an
> AMD 64 x2. The sed command produces no output on this machine even
> when called with the --version.

Did you actually try the uname -m command on both machines? The AMD 64
shouldn't report i686. Please show the exact output from uname -m, as
without it there's no way to figure out why the sed command may be
working incorrectly.

Re: sed

am 06.04.2008 11:28:51 von PK

stan wrote:

>> uname -m output is i686 on both machines. The problem machine is an
>> AMD 64 x2. The sed command produces no output on this machine even
>> when called with the --version.
>
> Did you actually try the uname -m command on both machines? The AMD 64
> shouldn't report i686.

It could, if it's running a 32-bit linux distribution. The problem seems to
be sed, which outputs nothing even when run with --version.

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.

Re: sed

am 06.04.2008 20:59:43 von wtree

On Apr 6, 5:28 am, pk wrote:
> stan wrote:
> >> uname -m output is i686 on both machines. The problem machine is an
> >> AMD 64 x2. The sed command produces no output on this machine even
> >> when called with the --version.
>
> > Did you actually try the uname -m command on both machines? The AMD 64
> > shouldn't report i686.
>
> It could, if it's running a 32-bit linux distribution. The problem seems to
> be sed, which outputs nothing even when run with --version.
>
> --
> All the commands are tested with bash and GNU tools, so they may uset
> nonstandard features. I try to mention when something is nonstandard (if
> I'm aware of that), but I may miss something. Corrections are welcome.

Yes the output of name -m is i686 on both machines. pk is correct,
the Linux distribution is Fedora 4. Its a general problem with the
output of the sed command on this machine. I used that paticular line
of code because it is failing a make file for an embedded target. I
can't get any output of the sed command on this machine to appear to
the console or even if I pipe it to a file no matter what arguments
are passed to sed. At one point the sed command functioned ok on this
machine.

Re: sed

am 06.04.2008 21:37:20 von cfajohnson

On 2008-04-06, wtree@imagic-inc.com wrote:
> On Apr 6, 5:28 am, pk wrote:
>> stan wrote:
>> >> uname -m output is i686 on both machines. The problem machine is an
>> >> AMD 64 x2. The sed command produces no output on this machine even
>> >> when called with the --version.
>>
>> > Did you actually try the uname -m command on both machines? The AMD 64
>> > shouldn't report i686.
>>
>> It could, if it's running a 32-bit linux distribution. The problem seems to
>> be sed, which outputs nothing even when run with --version.
>
> Yes the output of name -m is i686 on both machines. pk is correct,
> the Linux distribution is Fedora 4. Its a general problem with the
> output of the sed command on this machine. I used that paticular line
> of code because it is failing a make file for an embedded target. I
> can't get any output of the sed command on this machine to appear to
> the console or even if I pipe it to a file no matter what arguments
> are passed to sed. At one point the sed command functioned ok on this
> machine.

Then the sed binary has become corrupted or your sed command is
actually executing something else. Post the output of these
commands (in bash):

type -a sed
ls -l $( type -af sed )

--
Chris F.A. Johnson, author
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence

Re: sed

am 07.04.2008 15:59:55 von wtree

On Apr 6, 3:37 pm, "Chris F.A. Johnson" wrote:
> On 2008-04-06, wt...@imagic-inc.com wrote:
> > On Apr 6, 5:28 am, pk wrote:
> >> stan wrote:
> >> >> uname -m output is i686 on both machines. The problem machine is an
> >> >> AMD 64 x2. Thesedcommandproduces no output on this machine even
> >> >> when called with the --version.
>
> >> > Did you actually try the uname -mcommandon both machines? The AMD 64
> >> > shouldn't report i686.
>
> >> It could, if it's running a 32-bit linux distribution. The problem seems to
> >> besed, which outputs nothing even when run with --version.
>
> > Yes the output of name -m is i686 on both machines. pk is correct,
> > the Linux distribution is Fedora 4. Its a general problem with the
> > output of thesedcommandon this machine. I used that paticular line
> > of code because it is failing a make file for an embedded target. I
> > can't get any output of thesedcommandon this machine to appear to
> > the console or even if I pipe it to a file no matter what arguments
> > are passed tosed. At one point thesedcommandfunctioned ok on this
> > machine.
>
> Then thesedbinary has become corrupted or yoursedcommandis
> actually executing something else. Post the output of these
> commands (in bash):
>
> type -ased
> ls -l $( type -afsed)
>
> --
> Chris F.A. Johnson, author
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
> ===== My code in this post, if any, assumes the POSIX locale
> ===== and is released under the GNU General Public Licence

Thanks for your help Chris. The sed binary had a size of 0 bytes.

Re: sed

am 07.04.2008 18:19:31 von Maxwell Lol

wtree@imagic-inc.com writes:

> Thanks for your help Chris. The sed binary had a size of 0 bytes.

then you don't have sed on your computer.
It looks like someone with root privileges deleted it by mistake.

Try to re-install it. If necessary, get the source and compile/install
it yourself.