TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:1906] Shell Script Question -
>>>>> "UserCx" == UserCx  <UserCx@aol.com> writes:
    UserCx> In a message dated 98-10-25 16:07:10 EST, you write: <<
    UserCx> #!/usr/bin/perl
 
    UserCx>  while ($line = <STDIN>) { $line =~ tr/\r//; print $line;
    UserCx> } >>
    UserCx> how about the same thing as : perl -i -n -e"s/\r//" file1
    UserCx> file2 ....
Boy, emacs really screwed that up...I would do the latter but with the 
following change:
	perl -i -p -e 's/\r//' [filenames...]
You need the -p to actually print the changes -n only changes $_, but
doesn't actually do anything with it at the end of the while(<>) loop.
Andrew