The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   major errors with "here documents" in bash (http://hintsforums.macworld.com/showthread.php?t=44508)

hayne 09-12-2005 01:49 PM

Quote:

Originally Posted by zpro
This is what happen: Nothing
G4:~ rn$ cat > foo
test 123
G4:~ rn$

Type cat > foo ( then return)
(type) test 123 (then return)
(type) control -D

Umm, you were supposed to look at the contents of the file "foo" to see if it got what you typed.

hexdump -C foo

hayne 09-12-2005 01:55 PM

Quote:

Originally Posted by zpro
Just for the FYI.
I'm going to wipe the hard drive, and try a experiment....

when installing: macos x 10.3, I going to halt
the update process, right there... and try running CAT command.
this way, I will know if any corruption came off the disk,
some lib ?

Now, if cat << EOF works... then we can say, it must be the combind,
download to update to 10.3.9 that has a problem..
so I will break it down, until it breaks.

or,
if the cat command is broken right at the start, then
I need to call Apple.

1) This sounds like an interesting plan - it will tell you if the problem arose with a particular OS X update.

2) But before you do that, please boot into single-user and see if the problem exists there.

3) I don't think your hardware is supported by Apple, so I don't imagine you will get much joy that way. Besides which, it is out of warranty so I think you will have to pay to get tech support from Apple.

4) Speaking of the hardware, it would be nice to rule that out as the problem - that is why I suggested mounting your disk on some other Mac and running your copy of bash on that other Mac.

zpro 09-12-2005 02:49 PM

Well, I was right, :D
The cat test work just fine on 10.3 with NO updates...
running in bash

ie.
Last login: Mon Sep 12 14:33:41 on ttyp1
Welcome to Darwin!
G4:~ rn$ cat << EOF
> line 1
> line 2
> EOF
line 1
line 2
G4:~ rn$ cat << EOF | hexdump -C
> test 123
> EOF
00000000 74 65 73 74 20 31 32 33 0a |test 123.|
00000009
G4:~ rn$

G4:~ rn$ bash --version
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin7.0)
Copyright (C) 2002 Free Software Foundation, Inc.
G4:~ rn$


=========
as you can see...
my guess, there a corrupt lib in the combind update (10.3.9)
I will download the combine to 10.3.3 and test that first,
see where it breaks.

We know, for a fact ,if I did a full updated, via software update,
it will break ALL the time. So again, something in the FULL 10.3.9 update,
is corrupted.

-R

:D


All times are GMT -5. The time now is 05:58 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.