#author("2022-01-25T22:44:02+09:00","default:nobuoki","nobuoki") #author("2022-01-26T01:35:47+09:00","default:nobuoki","nobuoki") * tl;dr [#a2608d03] #prism(bash){{{ perl -pe 'eof and chomp' }}} 利用例 #prism(bash){{{ $ seq 3 | perl -pe 'eof and chomp' 1 2 3$ }}} * 別解 [#sc9b7e1e] #prism(bash){{{ sed -z '$s/\n$//' }}} ~-z オプションは GNU sed のみなので、macの場合は gsed を使おう