$'\nnn' - Linux

By Ophelia
at 2008-09-03T08:58
at 2008-09-03T08:58
Table of Contents
※ 引述《antontw (習慣)》之銘言:
: cat test.txt #範例文字檔
: \346\226\260\351\200\262
: anton@gama:~/test$ cat test.sh
: #!/usr/bin/env bash
: T=`cat test.txt`
: echo "echo "\$\'$T\'|bash
: 這樣就可以把 test.txt 裡面的 \346\226\260\351\200\262 轉回來。
: 沒有很好啦,應該會有很多例外...
一行文:
eval echo "$'$(< test.txt)'"
--
How shall my heart be unsealed unless it is broken?
By Kahlil Gibran
--
: cat test.txt #範例文字檔
: \346\226\260\351\200\262
: anton@gama:~/test$ cat test.sh
: #!/usr/bin/env bash
: T=`cat test.txt`
: echo "echo "\$\'$T\'|bash
: 這樣就可以把 test.txt 裡面的 \346\226\260\351\200\262 轉回來。
: 沒有很好啦,應該會有很多例外...
一行文:
eval echo "$'$(< test.txt)'"
--
How shall my heart be unsealed unless it is broken?
By Kahlil Gibran
--
Tags:
Linux
All Comments

By Elvira
at 2008-09-08T03:55
at 2008-09-08T03:55
Related Posts
請問關於GRUB硬碟的順序如何決定?

By Daph Bay
at 2008-09-02T22:48
at 2008-09-02T22:48
請問關於GRUB硬碟的順序如何決定?

By Quintina
at 2008-09-02T22:23
at 2008-09-02T22:23
英文段落的排版方法?

By Adele
at 2008-09-02T22:09
at 2008-09-02T22:09
用shell script合併兩個檔案

By Hazel
at 2008-09-02T21:33
at 2008-09-02T21:33
英文段落的排版方法?

By Christine
at 2008-09-02T21:16
at 2008-09-02T21:16