Skip to content

Instantly share code, notes, and snippets.

@staybuzz
Last active August 29, 2015 14:04
Show Gist options
  • Save staybuzz/0567fdc20afa0dd43b7f to your computer and use it in GitHub Desktop.
Save staybuzz/0567fdc20afa0dd43b7f to your computer and use it in GitHub Desktop.
mikutter複垢対応したのにいまさら
# mikutter account select
# mikutter config dir
mikudir="$HOME/mikutter-conf"
# get account entries
account=(`ls -l $mikudir | awk '$1 - /d/ {print $9}'`)
num=0
# print account data
for i in "${account[@]}" # ${account[@]} => num of elements
do
echo $num $i
num=`expr $num + 1`
done
# change account
echo -n "Which account do you want to use:"
read use
if [ ${use} -ge ${num} ]; then # ${use} >= ${num}
echo "non exist"
exit
fi
rm -f ~/.mikutter
ln -s $mikudir/${account[$use]} ~/.mikutter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment