LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-22-2006, 10:46 PM   #1
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Windows native bash-like script language


Hi, I am wondering if there are script languages like bash/perl/php that comes with windows?

I know all 3 of the above languages can be used under windows, and they run natively but what I am looking for is something more "native" to windows in the sense that it comes with, or supported by Microsoft directly so that you don't have to install anything to program or to run the scripts.

Regarding the console world in windows, all I know is DOS, but I don't think it is a powerful tool.

Any opinions are welcome.

Thanks.
 
Old 01-22-2006, 11:36 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can download Cygwin from http://www.cygwin.com/. It takes a while to download all of the packages, but it works just fine (eventually )
 
Old 01-22-2006, 11:44 PM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
VBScript? Not sure if it ships with all versions of Windows or not though.
 
Old 01-23-2006, 01:38 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Never been there, but that page may be helpful:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Old 01-23-2006, 03:21 AM   #5
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Perl is available in a Windows Port: http://www.cpan.org/ports/#win32
ActivePerl I've used and like
Also, Java can be used to build console applications, if that helps any.

Hope this helps

Edit: Just re-read the post, and that probably doesn't help much...
The closest thing you are going to get without a third-party application is batch scripts... but these pale terribly in comparison to anything listed in your post...

Last edited by scuzzman; 01-23-2006 at 03:23 AM.
 
Old 01-23-2006, 07:22 AM   #6
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks for the replies guys

I will check out about VBscript when I have the time.

Just for your information, The reason why I want it to be available on windows is that I want to write some utilities for my friends. I don't think it is a good idea to ask them to install perl/PHP/cygwin or whatever just to run those little scripts.

Thanks again.
 
Old 01-23-2006, 07:29 AM   #7
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
There is one more option: HTA files. These work well as primitive GUI programs that can do quite a few complex functions through Javascript and VBScript... http://msdn.microsoft.com/workshop/a...taoverview.asp
 
Old 01-23-2006, 08:23 PM   #8
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
Quote:
Originally Posted by koyi
Hi, I am wondering if there are script languages like bash/perl/php that comes with windows?

I know all 3 of the above languages can be used under windows, and they run natively but what I am looking for is something more "native" to windows in the sense that it comes with, or supported by Microsoft directly so that you don't have to install anything to program or to run the scripts.

Regarding the console world in windows, all I know is DOS, but I don't think it is a powerful tool.

Any opinions are welcome.

Thanks.
VBScript is what you want to use. Along with WSH (Windows Scripting Host), you can pretty much accomplish most things you would use bash/perl/python to do, though I find you end up writing a bit more code in some cases. VBScript is more like a glue language, in that it doesn't really have many useful libraries build into it (in contrast to perl or python), but with the CreateObject() function, you have access to boatloads of the standard ActiveX objects that come preinstalled on most Windows machines.

It is not a very modular language, though, so it is best for short, administrative type scripts, in my optinion.
 
Old 01-24-2006, 10:52 AM   #9
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Would you be happy with Korn and C shells? if so then download Microsoft Services for Unix from http://www.microsoft.com/windowsserv...u/default.mspx
 
Old 01-24-2006, 10:58 AM   #10
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
Who needs Perl.. I do everything by writing batch files..

 
Old 01-24-2006, 09:06 PM   #11
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Because I can do this with Perl... and you cannot with a batch file without installing third-party command-line utilities...
Code:
sub fix_id3 {
  # Here's where the magic is done
  $album = $_[0];
  $artist = $_[1];
  $genre = $_[2];
  $file = $_[3];
  print "What is the track name? ";
  chomp ( $title = <STDIN> );
  # wrap the object constructor call in an eval to 
  # make sure we catch any weird errors and object was 
  # created ok
  eval {
    $mp3 = MP3::Tag->new($file);    # Creates new object
  };
  # Make sure the object was created OK
  if ($@) {
    die qq{Error creating MP3 object, $@}; # if not, die and tell us why
  }
  unless ( exists $mp3->{ID3v1} ) { # assure ID3v1 is a valid option
    $mp3 -> new_tag("ID3v1");
    $mp3 -> {ID3v1}->write_tag; # otherwise, create it
  }
  $mp3 -> {ID3v1} -> title("$title"); # adds element title
  $mp3 -> {ID3v1} -> artist("$artist"); # adds element artist
  $mp3 -> {ID3v1} -> album("$album"); # adds element album
  $mp3 -> {ID3v1} -> genre("$genre"); # adds element genre
  $mp3 -> {ID3v1} -> write_tag(); # writes the tags
  $mp3 -> close(); # close the file
  # we'll also rename the files
  $oldname = "$file";
  $newname = "${artist} - ${title}.mp3";
  rename $oldname, $newname;

  print "\n";
}
 
Old 01-24-2006, 09:12 PM   #12
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Oh by the way - perl is available for Windows (in addition to the version bundled with Services for Unix). Check out ActivePerl at http://www.activestate.com/Products/ActivePerl/
 
Old 01-24-2006, 10:13 PM   #13
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks for all of the information.
I will try to choose one from the above suggestions

Of course if you have extra information to provide.
Please do so so that other people can take advantage of this post, too
 
Old 01-24-2006, 10:24 PM   #14
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
>> Because I can do this with Perl... and you cannot with a batch file without installing third-party command-line utilities...

once again sarcasm goes soaring over the head of an intended audience..

i know i should have used <joking> tags.. forgot where i was for a second..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wine: native windows DLLs simeandrews Linux - General 11 07-03-2005 08:15 AM
OpenOffice 2.0beta, running well but need install a Native Language Module Yaguarundi Slackware 1 06-24-2005 11:35 AM
emerge -u world with native language for openoffice Abec Linux - Software 2 01-15-2005 05:32 AM
Windows Native Machine code Paul_Lee Programming 1 07-23-2001 07:39 PM
Sharing Native Linux Partitions with Windows amaskedman Linux - Newbie 2 02-01-2001 08:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration