Wednesday 30 September 2015

Difference between setenv and set in csh

To findout difference between set and setenv first look at below example.



So, from above example, it can be conclude that set is setting a variable ,which has scope only to that terminal. Variable using set has no scope in scripts running from that terminal.

setenv has scope in terminal as well as in running scripts from that terminal. But any variable with same name is setting using set command and setenv command then set command is overwrite the value of that variable for terminal, but from scripts only variables using setenv can be access.

So, set has visibility only to terminal and can't be access from scripts.
setenv has visibility to both to terminal  and scripts, but set has more priority than setenv for terminal.

12 comments:

  1. On updating...!! This is my first visit to your blog, your post made productive reading, thank you....Software Testing Training in Bangalore

    ReplyDelete
  2. Thanks for taking time to share this post. It is really useful. Continue sharing more like this.
    Regards,
    Java Training in Chennai | Pega Training in Chennai

    ReplyDelete

  3. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it... Java Training in Chennai | Blue prism Training in Chennai

    ReplyDelete
  4. We came up with a great learning experience of Azure training in Chennai, from Infycle Technologies, the finest software training Institute in Chennai. And we also come up with other technical courses like Cyber Security, Graphic Design and Animation, Big Data Hadoop training in Chennai, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with great learning experience with outstanding training with experienced trainers and friendly environment. And we also arrange 100+ Live Practical Sessions and Real-Time scenarios which helps you to easily get through the interviews in top MNC’s. for more queries

    ReplyDelete