オプション

-i
結果をファイルを上書きする
$ sed 's/my/hoge/g' file1.txt    ← 各行の該当個所の全て(ファイル全体)を置換
$ sed 's/my/hoge/' file1.txt    ← 各行の初めの該当個所のみ置換