Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
* * * * * 1 votes

Difference Of Unix Shell Scripts And Windows Commands


5 replies to this topic

#1 tinoymalayil

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 154 posts
  • Gender:Male
  • Location:India
  • myCENT:23.11

Posted 21 April 2009 - 09:42 PM

I tried the shell script in Linux OS several times..But I think some of the script have some similarities with Windows DOS Commands.But what is actually happening inside a Shell Script..Why most of the people says that Linux or Unix Environment is more Secure..

How can I Study the Shell Script effectively..
Can anyone suggest any tutorial to study Shell Script better.....

#2 zakaluka

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 129 posts

Posted 21 April 2009 - 11:18 PM

Think of shell scripting as a full programming language that allows you to write "software" using regularly available linux commands. So, a shell script, either on linux or on windows (yes, windows also has shell scripts), will contain commands.

If you want to learn more about shell scripting, take a look at http://www.freeos.com/guides/lsst/ and http://steve-parker.org/sh/sh.shtml . Also, reading the info / man page for bash (I would call it the most popular linux shell environment for desktop computers) will give you all the information you need to create shell scripts.

If you are interested in using shell scripts on windows, look at http://msdn.microsof...y/ms950396.aspx . Windows provides JScript and VBScript for use on its systems. However, there are better alternatives available, like Auto It ( http://www.autoitscr...it3/index.shtml ).

Regards,

z.

#3 tinoymalayil

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 154 posts
  • Gender:Male
  • Location:India
  • myCENT:23.11

Posted 22 April 2009 - 01:45 AM

Thank You 4 Ur Suggestion and Reply.

Is Shell Script is Similar to Javascript and VBScript..
Can we use this shell script in html pages.?

#4 random truth

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 51 posts

Posted 22 April 2009 - 01:58 AM

View Posttinoymalayil, on Apr 22 2009, 02:45 AM, said:

Thank You 4 Ur Suggestion and Reply.

Is Shell Script is Similar to Javascript and VBScript..
Can we use this shell script in html pages.?
No you can not use shell scripting in html page. Shell script serves a different purpose than javascript and VBScript.
Shell script is used to run a series of commands in a UNIX shell. Or in windows a command prompt (The commands are different so I dont really call this shell scripting). Shell Scripting is to make rudimentary or repetitive tasks faster and more automated. It is often used for install scripts, or maintenance scripts.

#5 zakaluka

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 129 posts

Posted 24 April 2009 - 03:40 AM

View Posttinoymalayil, on Apr 22 2009, 02:45 AM, said:

Thank You 4 Ur Suggestion and Reply.

Is Shell Script is Similar to Javascript and VBScript..
Can we use this shell script in html pages.?

As random truth mentioned, shell scripts are NOT the same as web scripts. JScript is NOT javascript. Shell scripts are written to be executed on the command-line interpreter. On windows, this is the command prompt. On linux, this is the terminal running a variant of 'sh' (like bash).

Web scripts, on the other hand, are designed to add more functionality to static HTML pages.

I'm going to add some confusion to the mix: certain languages can be used to write both shell scripts and web scripts. Take Perl, for example. In this case, you could write a "shell script" that runs using the perl executable on your local system. You can also write a Perl script that will run on a web server. However, their purpose is totally different.

Regards,

z.

#6 k_nitin_r

    Grand Imperial Poobah

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,114 posts
  • Gender:Male
  • Location:Dubai
  • myCENT:50.55

Posted 07 May 2009 - 03:13 PM

View Posttinoymalayil, on Apr 22 2009, 01:42 AM, said:

I tried the shell script in Linux OS several times..But I think some of the script have some similarities with Windows DOS Commands.But what is actually happening inside a Shell Script..Why most of the people says that Linux or Unix Environment is more Secure..

How can I Study the Shell Script effectively..
Can anyone suggest any tutorial to study Shell Script better.....


Hi!

The similarity that you see is between Linux shell scripts and DOS batch files - both are essentially command-line statement put into a file (they are actually more than just a series of statements, but at a very basic level, that's what they are!).

A Linux shell script consists of the location of an interpreter (usually the "bash" script) at the top of the file, indicated by the "#!", followed by statements that can be executed. If you've never written shell scripts before, here's an article on writing your first shell script: http://www.freeos.co.../ch02sec01.html

Do post back if you're looking for more.

Regards,
Nitin




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users