LoginSignup
2
1

More than 3 years have passed since last update.

よく使う身体で覚えるべきシェルコマンド一覧

Posted at

よく使う身体で覚えるべきシェルコマンド一覧

findの使いかた!:

$ find ファイル名

$ find 検索先 -name ファイル名

$ find work -name *.dat

https://eng-entrance.com/linux-command-grep
grepの使いかた!:

grep 検索正規表現 ファイル名

$ grep a work/*

grep 検索文字列 ファイル名 | grep 検索文字列2

seq


比較演算子!!

echo $(( 5 + 5))
$ echo $(( 5 - 5))
$ echo $(( 5 * 5))
$ echo $(( 5 / 5))
$ echo $(( 5 % 5))

eq:equal to
ge:greater than or equal to
gt:greater than
le:less than or equal to
lt:less than
ne:not equal to

数値比較の演算子

意味

数値1 -eq 数値2

数値1と数値2が等しければ真

数値1 -ge 数値2

数値1が数値2より大きい、もしくは等しければ真

数値1 -gt 数値2

数値1が数値2より大きければ真

数値1 -le 数値2

数値1が数値2より小さい、もしくは等しければ真

数値1 -lt 数値2

数値1が数値2未満であれば真

数値1 -ne 数値2

数値1と数値2が等しくなければ真

2
1
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
2
1