pipeline processing using cat

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












original:



./A_process.py _ < input.dict > output.dict.tmp
./B_process.py _ < output.dict.tmp > output.dict
rm output.dict.tmp


I am trying to make it into a pipeline, so



cat input.dict | A_process.py _ | B_process.py _ > output.dict


however it shows "A_process.py command not found"...



I guess something wrong with the environment, but not sure what to do. I'm just a novice, so every advice and tutorial links are welcome.







share|improve this question




















  • ./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
    – steeldriver
    Mar 6 at 15:27














up vote
1
down vote

favorite












original:



./A_process.py _ < input.dict > output.dict.tmp
./B_process.py _ < output.dict.tmp > output.dict
rm output.dict.tmp


I am trying to make it into a pipeline, so



cat input.dict | A_process.py _ | B_process.py _ > output.dict


however it shows "A_process.py command not found"...



I guess something wrong with the environment, but not sure what to do. I'm just a novice, so every advice and tutorial links are welcome.







share|improve this question




















  • ./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
    – steeldriver
    Mar 6 at 15:27












up vote
1
down vote

favorite









up vote
1
down vote

favorite











original:



./A_process.py _ < input.dict > output.dict.tmp
./B_process.py _ < output.dict.tmp > output.dict
rm output.dict.tmp


I am trying to make it into a pipeline, so



cat input.dict | A_process.py _ | B_process.py _ > output.dict


however it shows "A_process.py command not found"...



I guess something wrong with the environment, but not sure what to do. I'm just a novice, so every advice and tutorial links are welcome.







share|improve this question












original:



./A_process.py _ < input.dict > output.dict.tmp
./B_process.py _ < output.dict.tmp > output.dict
rm output.dict.tmp


I am trying to make it into a pipeline, so



cat input.dict | A_process.py _ | B_process.py _ > output.dict


however it shows "A_process.py command not found"...



I guess something wrong with the environment, but not sure what to do. I'm just a novice, so every advice and tutorial links are welcome.









share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 15:24









Luca

132




132











  • ./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
    – steeldriver
    Mar 6 at 15:27
















  • ./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
    – steeldriver
    Mar 6 at 15:27















./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
– steeldriver
Mar 6 at 15:27




./A_process.py will look in the current directory for A_process.py whereas A_process.py will only search your PATH
– steeldriver
Mar 6 at 15:27










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










As @steeldriver wrote in his comment, the problem you are facing is that the script you are executing is not in your PATH



The simple solution will be to add the prefix ./ to the script-name, assuming that you are running the command in the same folder the script is located:



cat input.dict | ./A_process.py _ | ./B_process.py _ > output.dict


Other options might be:



  • Add the path of the script location into the PATH variable.

  • Instead of ./script_name use full-path of the script /full/path/to/script/directory/A_process.py





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428534%2fpipeline-processing-using-cat%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    As @steeldriver wrote in his comment, the problem you are facing is that the script you are executing is not in your PATH



    The simple solution will be to add the prefix ./ to the script-name, assuming that you are running the command in the same folder the script is located:



    cat input.dict | ./A_process.py _ | ./B_process.py _ > output.dict


    Other options might be:



    • Add the path of the script location into the PATH variable.

    • Instead of ./script_name use full-path of the script /full/path/to/script/directory/A_process.py





    share|improve this answer
























      up vote
      1
      down vote



      accepted










      As @steeldriver wrote in his comment, the problem you are facing is that the script you are executing is not in your PATH



      The simple solution will be to add the prefix ./ to the script-name, assuming that you are running the command in the same folder the script is located:



      cat input.dict | ./A_process.py _ | ./B_process.py _ > output.dict


      Other options might be:



      • Add the path of the script location into the PATH variable.

      • Instead of ./script_name use full-path of the script /full/path/to/script/directory/A_process.py





      share|improve this answer






















        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        As @steeldriver wrote in his comment, the problem you are facing is that the script you are executing is not in your PATH



        The simple solution will be to add the prefix ./ to the script-name, assuming that you are running the command in the same folder the script is located:



        cat input.dict | ./A_process.py _ | ./B_process.py _ > output.dict


        Other options might be:



        • Add the path of the script location into the PATH variable.

        • Instead of ./script_name use full-path of the script /full/path/to/script/directory/A_process.py





        share|improve this answer












        As @steeldriver wrote in his comment, the problem you are facing is that the script you are executing is not in your PATH



        The simple solution will be to add the prefix ./ to the script-name, assuming that you are running the command in the same folder the script is located:



        cat input.dict | ./A_process.py _ | ./B_process.py _ > output.dict


        Other options might be:



        • Add the path of the script location into the PATH variable.

        • Instead of ./script_name use full-path of the script /full/path/to/script/directory/A_process.py






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 6 at 15:39









        Yaron

        3,19421027




        3,19421027






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428534%2fpipeline-processing-using-cat%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay