Enabling server mode
Bill Fink
yellowdog-general@lists.terrasoftsolutions.com
Mon, 9 Aug 2004 23:55:49 -0400
On Mon, 09 Aug 2004, Patrick Smith wrote:
> Atro Tossavainen wrote:
> >>What's wrong with simply this?
> >>echo -ne "\x01\x13\x01" > powerup-boot
> ...
> > (The following is from "man echo" on Solaris.)
> >
> > USAGE
> > Portable applications should not use -n (as the first argu-
> > ment) or escape sequences.
>
> printf '\1\2\3' > powerup-boot
This is again bash specific. On my shell (tcsh) this just gives:
gwiz% printf '\1\2\3' > powerup-boot
printf: \1: invalid escape
You can use the system printf command as follows (with the correct
values for the original topic being discovered):
/usr/bin/printf '\x1\x13\x1' > powerup-boot
And:
> On Mon, 9 Aug 2004, Atro Tossavainen wrote:
>
> > echo -n 123 > powerup-boot0
> > tr 1 '\001' < powerup-boot0 > powerup-boot1
> > tr 2 '\023' < powerup-boot1 > powerup-boot2
> > tr 3 '\001' < powerup-boot2 > powerup-boot
>
> Why all the temporary files...
>
> echo -n 123 | tr 123 '\001\023\001' > powerup-boot
Good point. That's much cleaner.
Just goes to show that there's lots of different ways to do the
same thing on Linux/Unix.
Of all the variations given, I think the simplest was:
/bin/echo -ne "\001\023\001" > powerup-boot
Never did hear back from sadfsdf to see if he tried this out.
-Bill