WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: `sed` fails  (Read 3591 times)

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
`sed` fails
« on: August 11, 2017, 10:06:42 PM »
Normally I can post from TC64 via links.
Since the tree branch temporarily broke the WiFi connection, I'm now using M$.
What a disaster. The victim is presented with plenty smart-arse ARTY effects, instead of
a sensible hierarchy:
...
TC64
...
  Read
  Send
  Search
  ...
---------------------- I can't know If/THAT I'm writing from the correct <node>.
The fallen branch has only temporarily disabled TC's WiFi;
but TC's failed `sed` makes my critical scripts useless!
----
tc@box:~$ echo "Zürich" | hexdump -C
00000000  5a c3 bc 72 69 63 68 0a                           |Z..rich.|
00000008
tc@box:~$ echo "Zürich" | sed 's/\xc3\xbc/ue/' | hexdump -C
00000000  5a c3 bc 72 69 63 68 0a <-fail to replace: c3 bc                          |Z..rich.|
00000008
----> Test code on nonTC system ?!
tc@box:~$ sudo chroot /mnt/sdc1
\u@\h:\w$ echo "Zürich" | hexdump -C
00000000  5a c3 bc 72 69 63 68 0a                           |Z..rich.|
--------------------------
 \u@\h:\w$ echo "Zürich" | sed 's/\xc3\xbc/ue/' | hexdump -C
00000000  5a 75 65 72 69 63 68 0a                           |Zuerich.|
====> code confirmed under Debian7: sed translatesHex(c3 bc, 75 65)





Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: `sed` fails
« Reply #1 on: August 12, 2017, 01:46:52 AM »
Three things:

1: Your wifi issue is unclear.  If you're unable to update the Wifi extensions properly, the reason maybe because you've not assigned a tce directory as previously stated.
2: The temporary rtlwifi-4.8.17-tinycore64.tcz extension will no longer be required as all Realtek rtlwifi modules within wireless-4.8.17-tinycore64.tcz have been updated. 
3: Re sed, my guess is you're attempting to use an unsupported feature of busybox sed.  My suggestion is try using GNU sed instead?
« Last Edit: August 12, 2017, 01:57:35 AM by coreplayer2 »

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: `sed` fails
« Reply #2 on: August 12, 2017, 08:24:59 AM »
Thanks,
I think the newer WiFi version was confirmed [before the tree branch cut the WiFi access].
It will be tested again soon. Somehow the testing of gpm-root led to the WiFi update?
Updates cause much chaos.
It seems pointless using TC for development, if basics like sed, are incompatible.
TC is then just good for confirmed <fast gun applications>.
But not as a system that will allow learning effort to be of benefit for the future.
Unfortunately the whole Linux community is becoming more fragmented.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14754
Re: `sed` fails
« Reply #3 on: August 12, 2017, 03:54:44 PM »
Loading the compiletc extension will also load the full fat versions of sed and friends to give a development environment.

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: `sed` fails
« Reply #4 on: August 12, 2017, 09:23:10 PM »
It seems pointless using TC for development, if basics like sed, are incompatible.
TC is then just good for confirmed <fast gun applications>.
But not as a system that will allow learning effort to be of benefit for the future.
Unfortunately the whole Linux community is becoming more fragmented.

hi labeas,

You can't have an extremely small system and still have a full featured OS. How do you think they make it so small?

Read up on Busybox, think routers, think embedded systems.

If you need full blown Linux then use a full blown Linux!

regards
Greg