Tag Info

New answers tagged


I don't have access to OSX so this is a wild guess... but you can try other techniques to delete files, rather than relying on the shell's globbing to match. Try: find . -not -type d -print -delete or even find . -not -type d -print | perl -nle 'print; unlink'


Your problem is that by filtering on raw bytes in a UTF-8 character stream, you're eating part of a unicode sequence in a UTF-8 file, resulting in an invalid byte sequence. That can't work. Instead, you need to use a tool that understands UTF-8, and apply a filter on the unicode data, rather than the raw bytes. Since I don't know which implementation of awk ...


Using awk you can do it as: awk '{for(i=1; i<=length;i++) if(substr($0,i,1)>="\xS_INDEX" && substr($0,i,1)<="\xE_INDEX"){printf substr($0,i,1);f=1;} if(f)printf "\n"; f=0}' filename Here S_INDEX and E_INDEX are the starting and ending index of ascii in hex. For input: 1243 135 dgfsdaa 125 sdg124 sdf34 Selecting only digits: S_INDEX = ...


This is most probably a problem with your $PS1 variable. The $PS1 variable is defined in your zshrc file. This file is located in /etc/zshrc The $PS1 variable stores the encoded (ASCII I believe) information to produce your prompt. The first thing you want to do is see what your $PS1 is currently. To do this type echo $PS1 in your terminal. The standard ...


When you give a locale by the name language_COUNTRY, you actually specify one of the locales defined as language_COUNTRY.codeset: the default one for this language and country. In the case of en_AG, it appears that the default codeset is UTF8. For en_US, it is ISO-8859-1, and therefore en_US is in fact equivalent to en_US.ISO-8859-1.


Use RXVT in daemon mode, and use the tabbed extension for urxvt. Execute urxvtd when you start your session, and spawn new windows with urxvtc. Each window takes only around 1-10M additional memory.


To take care of the cases in which the locale string contains a lowercase utf8 substring, you can set bash's nocasematch option and make the dash optional: shopt -s nocasematch [[ $LANG =~ UTF-?8$ ]] && echo "Uses UTF-8 encoding.."


From Wikipedia : On POSIX platforms, locale identifiers are defined similarly to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character encoding is included as a part of the identifier. It is defined in this format: [language[_territory][.codeset][@modifier]]. (For example, ...


On POSIX system, you can use locale: $ if (locale | grep -e 'utf8' -e 'UTF-8') >/dev/null 2>&1; then echo UTF8; fi UTF8


I am using Cinnamon on Linux Mint 17.1. In my Gnome Terminal this works Ctrl+Shift+U then A, E, Space. (Enter works as well) to get the Registered symbol ® ( <- and firefox works as well), for which the unicode hex value is AE. I don't recall ever enabling this, so it looks like there is something missing on your setup.

Top 50 recent answers are included