Help us understand the problem. What is going on with this article?

bashで大文字/小文字の変換

More than 1 year has passed since last update.

文字列を全て小文字(or大文字)にさくっと変換したい時は,trコマンドを使うとよさそう。

小文字にする。

$ echo KOTATSU | tr '[:upper:]' '[:lower:]'
kotatsu

大文字にする。

$ echo mikan | tr '[:lower:]' '[:upper:]'
MIKAN

私の全然更新していなかったbashはversion 3.2.57で古くて,これ使えなかったので…。
[Qiita] Bashで変数を大文字小文字変換(uppercase/lowercase)する

trコマンドの詳しい使い方はこちら。
http://itpro.nikkeibp.co.jp/article/COLUMN/20060227/230906/

myy
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした