mac

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mac [2012/02/10 02:26]
drkrimson
mac [2012/02/10 02:28] (current)
drkrimson echo -e "\e" vs echo -e "\033" vs echo $'\e'
Line 8: Line 8:
  
 **echo -e weirdness** **echo -e weirdness**
 +
 Something I came across today while testing some bash-4.2 scripts on a mac; to print some text in bold I used the ancient ansi escape sequence <​ESC>​[1m. Something I came across today while testing some bash-4.2 scripts on a mac; to print some text in bold I used the ancient ansi escape sequence <​ESC>​[1m.
  
Line 22: Line 23:
 //Ok//, I thought, //maybe escape is disabled on some level//.. but just out of curiosity, and a healthy dose of boredom, I tried to //Ok//, I thought, //maybe escape is disabled on some level//.. but just out of curiosity, and a healthy dose of boredom, I tried to
 <​code>​ echo -e "So what if I \033[1m give the octal value of \e033[0m escape"</​code>​ <​code>​ echo -e "So what if I \033[1m give the octal value of \e033[0m escape"</​code>​
-and Lo-and-Behold,​ it printed it proper+and Lo-and-Behold,​ it printed it proper
  
 ''​So what if I **give the octal value of ** escape'' ​ ''​So what if I **give the octal value of ** escape'' ​
Line 40: Line 41:
 gave me nice and proper ​ gave me nice and proper ​
  
-''​why dont u **W0RK''​+''​why dont u **W0RK** ''​
  
  
Line 52: Line 53:
 Krim Krim
  
--- +--  
- +Don't even get me started about ''​printf "​%(%Y-%m-%d)T"​ -1''​
-Don't even get me started about ''​printf "​%(%Y-%m-%d)T"​ -1'' ​;)+
  • mac.1328840785.txt
  • Last modified: 2012/02/10 02:26
  • by drkrimson