r*r
5 楼
or if ur unix doesn't hv it (i think all solaris hv this command)
u can use a simple perl script.
#!/usr/local/bin/perl
require "flush.pl";
$TMP_FILE = "/tmp/dos2unix.tmp";
foreach $f (@ARGV) {
if ( -f $f) {
print "Processing $f ..."; &flush( STDOUT);
open( OUT, "> $TMP_FILE") || die "Cannot open tmp file for writing\n";
open( IN, "< $f") || die "Cannot open tmp file for reading\n";
while( $line =
$l = length( $line);
if ( ( $l
【在 p**h 的大作中提到】
: you can try 'dos2unix'.
c*t
6 楼
Thank you very much!
【在 r***r 的大作中提到】
:
: or if ur unix doesn't hv it (i think all solaris hv this command)
: u can use a simple perl script.
: #!/usr/local/bin/perl
: require "flush.pl";
: $TMP_FILE = "/tmp/dos2unix.tmp";
: foreach $f (@ARGV) {
: if ( -f $f) {
: print "Processing $f ..."; &flush( STDOUT);
: open( OUT, "> $TMP_FILE") || die "Cannot open tmp file for writing\n";
【在 r***r 的大作中提到】
:
: or if ur unix doesn't hv it (i think all solaris hv this command)
: u can use a simple perl script.
: #!/usr/local/bin/perl
: require "flush.pl";
: $TMP_FILE = "/tmp/dos2unix.tmp";
: foreach $f (@ARGV) {
: if ( -f $f) {
: print "Processing $f ..."; &flush( STDOUT);
: open( OUT, "> $TMP_FILE") || die "Cannot open tmp file for writing\n";
h*a
7 楼
onliner.
perl -pi -e 's/\cM//g' *
【在 r***r 的大作中提到】
:
: or if ur unix doesn't hv it (i think all solaris hv this command)
: u can use a simple perl script.
: #!/usr/local/bin/perl
: require "flush.pl";
: $TMP_FILE = "/tmp/dos2unix.tmp";
: foreach $f (@ARGV) {
: if ( -f $f) {
: print "Processing $f ..."; &flush( STDOUT);
: open( OUT, "> $TMP_FILE") || die "Cannot open tmp file for writing\n";
perl -pi -e 's/\cM//g' *
【在 r***r 的大作中提到】
:
: or if ur unix doesn't hv it (i think all solaris hv this command)
: u can use a simple perl script.
: #!/usr/local/bin/perl
: require "flush.pl";
: $TMP_FILE = "/tmp/dos2unix.tmp";
: foreach $f (@ARGV) {
: if ( -f $f) {
: print "Processing $f ..."; &flush( STDOUT);
: open( OUT, "> $TMP_FILE") || die "Cannot open tmp file for writing\n";
相关阅读
linux/unix 有没有把所有或者大部分命令结合起来的练习的projec (转载)请问C的debuggerhow to redirect the output在Solaris下ls, 如何让文件名按时间顺序排序?请教一个关于nohup的问题how to sscanf this case.欢迎加入俱乐部python (转载)如何得到一个进程的CPU运行时间,谢谢死机reset后到底需不需要force fsch check? (转载)osx 10.4 10.5 连smb 问题我的cygwin总是发布了email问一个java和netbeans的问题 (转载)请教如何把运算放到background?DVD player for RHEL?gnuplot画图求助Silicon graphics 倒了关于root帐号的管理问题Open Solaris 疑问这个版真冷大家都用什么Profiler?