Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] what's the source of the error here? (system command)

Expand Messages
  • merlyn@stonehenge.com
    ... john system( dd if=/dev/zero of=/Users/jayeola/virt/running/dumb.img john seek=$dd_file_size count=1 ) or die failed dd perldoc -f system says: system
    Message 1 of 2 , Jun 6, 2010
      >>>>> "john" == john maclean <jayeola@...> writes:

      john> system("dd if=/dev/zero of=/Users/jayeola/virt/running/dumb.img
      john> seek=$dd_file_size count=1") or die "failed dd"

      perldoc -f system says:

      system LIST
      system PROGRAM LIST
      The return value is the exit status of the program as returned
      by the "wait" call. To get the actual exit value, shift right by
      eight (see below).

      The exit code is *zero* when everything worked OK, so in effect, you're
      saying "die if everything worked"!

      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
      See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
    Your message has been successfully submitted and would be delivered to recipients shortly.