SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    System command not working. Anything wrong?

    Hi guys,

    I've a perl script where in i've system command used to run a tesseract.exe application. This perl script is run from Red hat linux OS.

    System command provided is as below:
    system("$te_dir/tesseract $dir/$file $dir/$fle1") == 0 or die "Tesseract failed: $!";

    And i get a message as below:
    Tesseract failed: No such file or directory at boot.pl line 743.

    Can i know what is the problem here?

    Thanks,
    Ramki

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,329
    Mentioned
    191 Post(s)
    Tagged
    4 Thread(s)
    Firstly, you cannot run ".exe" files on any Linux natively.
    You will need to call up an emulator (like WINE).

    Secondly, that command includes many variable declarations. You cannot simply call that on a command line because none of those variables have any reference in that context.

    Is the "tesseract" application located on the Linux machine? Where (exactly) in the filesystem is it? Do you have a Windows emulator to use for this?
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Secondly, that command includes many variable declarations. You cannot simply call that on a command line because none of those variables have any reference in that context.
    No actually true. The double quotes mean that they variable will be replaced by their value.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •