daily pastebin goal

Echo Auxiliary File Example

sweenig Jan 3rd, 2014 2,040 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. (
  3. echo #!/usr/bin/perl
  4. echo open ^(INFILE, @ARGV[0]^);
  5. echo my $line;my @thelines;my $thecounter=0;
  6. echo while ^(^<INFILE^>^) {chomp;$line = $_;$line =~ s/\t/,/g;$thelines[$thecounter]=$line;++$thecounter;}
  7. echo close ^(INFILE^);
  8. echo open ^(OUTFILE, ">@ARGV[0]"^);
  9. echo foreach ^(@thelines^) {print OUTFILE "$_\n";}
  10. echo close ^(OUTFILE^);
  11. ) > tsv2csv.pl
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand