Guest User

Untitled

a guest
Jul 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. print( '-depsc', 'filename.eps');
  2.  
  3. -%%CreationDate: 06/29/2011 17:52:57
  4. +%%CreationDate: 06/30/2011 19:18:03
  5.  
  6. # sed
  7. sed -i file.eps '/^%%CreationDate: /d'
  8.  
  9. # grep
  10. grep -v '^%%CreationDate: ' file.eps > tmp && mv tmp file.eps
  11.  
  12. # perl
  13. perl -i -ne 'print if not /^%%CreationDate: /' file.eps
  14.  
  15. %# construct command, arguments and input filename (with quotes to escape spaces)
  16. cmd = ['"' fullfile(matlabroot, 'sysperlwin32binperl.exe') '"'];
  17. args = ' -i.bak -ne "print if not /^%%CreationDate: /" ';
  18. fname = ['"' fullfile(pwd,'file.eps') '"'];
  19.  
  20. %# execute command
  21. system([cmd args fname])
Add Comment
Please, Sign In to add comment