改行コード確認
cat -e test.pl
で確認可能
インストール
改行コード変換のためdos2unix
コマンドを使う。
yum install dos2unix.x86_64
改行コード変換
CR+LF(^M
+$
) → LF($
)
dos2unix test.pl
表示例
[tsunokawa@test tmp]$ dos2unix test.pl dos2unix: converting file test.pl to Unix format ... [tsunokawa@test tmp]$
確認
[tsunokawa@test tmp]$ cat -e test.pl #!/usr/bin/env perl$ $ use strict;$ use warnings;$ use feature 'say';$ $ say "hoge";$ $ [tsunokawa@test tmp]$
LFになった。