This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CC Command in einem *.sh Script benutzen?

Hallo,

Ich möchte gerne cc in einem script verwenden um die IP eines bestimmten Objects auszulesen. Dazu benutze ich folgenden Befehl:

cc get_object REF_NetHosDynamicdyn | grep "'address'"  | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"

 

Das klappt in der Console auch wunderbar (vorheriges su durchgeführt)

 

Allerdings kommt wenn ich den Befehl in meinem Script habe und ausführe (gestartet mit sh scriptname.sh):

updatedyndnshosts.sh: line 4: cc: command not found

Hat jemand eine Idee wie ich CC ebenfalls im Script verwenden kann?

 

Viele Grüße



This thread was automatically locked due to age.
Parents
  • Pardon my English response to a German question:

     

    cc is an alias for confd-client.plx which resides in /usr/local/bin/

    utm9:/root # alias | grep cc
    alias cc='confd-client.plx'
    utm9:/root # which confd-client.plx
    /usr/local/bin/confd-client.plx

Reply
  • Pardon my English response to a German question:

     

    cc is an alias for confd-client.plx which resides in /usr/local/bin/

    utm9:/root # alias | grep cc
    alias cc='confd-client.plx'
    utm9:/root # which confd-client.plx
    /usr/local/bin/confd-client.plx

Children