LoginSignup
3
3

More than 5 years have passed since last update.

Switch bashrc settings for Cygwin or MinGW

Last updated at Posted at 2012-06-20

via

.bashrcでのCygwinとMinGWの見分け方 #Bash - Qiita

~/.bashrc

c.f. https://gist.github.com/2942330#file_.bashrc

~/.bashrc
sysname=`uname -s | sed -e "s/\([a-zA-Z]\+\).*/\1/"`
if [ "$sysname" = "CYGWIN" ]; then
    LANG=ja_JP.UTF-8
elif [ "$sysname" = "MINGW" ]; then
    LANG=ja_JP.sjis
    JLESSCHARSET="japanese-sjis"
    OUTPUT_CHARSET=sjis
fi

whereami (Simulate 'uname -o')

c.f. https://gist.github.com/2942330#file_whereami

whereami
#!/usr/bin/bash
sysname=`uname -s | sed -e "s/\([a-zA-Z]\+\).*/\1/"`
echo $sysname
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3