Bus errorとSegmentation faultに困ったら見るブログ

物理の研究者による日々の研究生活のメモ書きです ( python/emacs/html/Japascript/シェルスクリプト/TeX/Mac/C言語/Linux/git/tmux/R/ポケモンGO)

2025-04-18から1日間の記事一覧

【シェル】ファイルの中にあるhogeとhogehogeを区別する方法

あるデータ(data.txt)がある、中身は1 hoge 2 hogeeee 3 foo 4 barみたいな ここでcat data.txt | grep "hoge"とすると、hoge以外にhogehogeも引っかかってしまう・・・ 解決方法1 grepでやる場合は、cat hoge.txt | grep 'hoge$'とすると、行末にあるhogeだ…

【git】checkoutで過去に遡ったはいいが、戻り方を知らなかった人のための記事

そんなやつおる〜?(私です) % git checkout hogehoge Note: checking out 'hogehoge'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state with…