1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

知っておくとちょっと便利。コマンドラインでワンライナーするためのオプションたち

Last updated at Posted at 2021-04-02

はじめに

ちょっとした関数の機能を確かめたいときやかんたんな文字列処理を取得したいときに力を発揮するワンライナー。各コマンドをワンライナーを実行するオプションが実行環境によってまちまちだったのでまとめました。

Ruby

-eオプションを使います

ruby -e "puts (`a` * 1000).to_s"

Python

-cオプションを使います

python -c "print('a' * 1000)"

PHP

-rオプションを使います

php -r "print(var_dump(empty(trim(' '))));"
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?