Jump to content

which java | sed -e 's/(.*)/bin/java/1/g'

So, I'm trying to install Apache Hadoop on the worker nodes in a cluster computer (only 7 workers). I'm getting various errors when I run the sed, the first is error

unrecognized option "s"

I tried

which java | sed -e '/(.*)/bin/java/1/g'

and got

unexpected token ('

Please help

                     .
                   _/ V\
                  / /  /
                <<    |
                ,/    ]
              ,/      ]
            ,/        |
           /    \  \ /
          /      | | |
    ______|   __/_/| |
   /_______\______}\__}  

Spoiler

[I5-12600k | 32gb DDR5 6000 | RTX5070 | 2x1tb M.2]

 

[Ryzen 5 1600 | 16gb DDR4 3200 | GTX1030 | 4x 8tb HDD] 

 

Link to comment
https://linustechtips.com/topic/487954-sed-help-for-ubuntu/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×