Shell
historyのオプションはどの程度までコマンドを遡るかを意味する $ history -500 | grep "検索したいワード"
シェルスクリプトでファイル存在確認 test.csvが存在するときに、test.csvを削除する if [ -e test.csv ]; then rm test.csv fi 「-e test.txt」・・・test.txtが存在しているか。 「-f test.txt」・・・test.txtが存在し、通常のファイルであるか。 「-r te…
単純に文字クラス[]の中に「\記号」という形式で記述すれば完了。 中には不要なものも存在するが、つけておいても問題ない。 cat test.csv | sed -e "/[\.\*]/d" cat test.csv | sed -e "/[\.\*\?\$\%\&\!\"\'\@\/\_\~\(\)\'\$\#\{\}\.\^\|\[\+\-]/d"
「CTRL V+TAB」でタブを入力することができる。 $ cat test.txt | sed -e "s/「CTRL V+TAB」/,/g" mac OSX で sedを使ってtabの文字列を置換 - Qiita
$ cat test.txt | grep $'¥t' リンク 逆引きUNIXコマンド/grepでタブを検索する方法 - Linuxと過ごす