Tag Info

New answers tagged


Don't worry about it, use standard Unix/(GNU) Linux tools, and then run unix2dos on your Unix file.


you could try Geany, it's a gui type text editor, and line endings are one of the many things you can edit.


Edit: So what you actually want to know is how to convert a file from Unix to Windows line endings. Do it from the command line, not the editor, with the following one-liner. It will work correctly even if you run it on the same file multiple times. perl -pe 's/\r?\n/\r\n/' unix-file.txt > windows-file.txt You can view a file with od -c to see its ...


This can easily be done with vim. If you want to convert all line breaks into CR/LFs in a file, Open the file in vim (vim file.txt). Convert the file to DOS format (which means CR/LF line breaks): :e ++ff=dos. Save and quit (Shift+Z Shift+Q or :wq). If you simply want to insert a single CR/LF line break, Open the file in vim (vim file.txt). Navigate ...


POSIX one: $ awk 'BEGIN{for(n=33;n<=90;n++)printf "%c",n}' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ Perl one: $ perl -e 'print chr for 33..90'


With bash >= 3.0, ksh93r and above, zsh: printf $( printf '\\x%02x' {65..90})


Perhaps like this: perl -e 'for(65..90) { printf "%c", $_ }' Or, if you insist to do it with printf(1) on Linux: printf $( printf '\\x%02x' $( seq 65 90 ) ) Or, with printf(1) on *BSD: printf $( printf '\\x%02x' $( jot - 65 90 1 ) )

Top 50 recent answers are included