how to embed shell script within a .BAT file
Mon Nov 10 04:24:00 GMT 2014
On Mon, Nov 10, 2014 at 05:10:00AM +0300, Andrey Repin wrote:
> Greetings, Mike Brown!
> >> > I'm tired of creating pairs of script files: a clickable .BAT file
> >> > to invoke my shell script and then my shell script to do the actual
> >> > work.
> >> google: cygwin shell wrapper script
> >> I posted mine in the mailing list not once, and it's not the only available
> >> solution.
> > I'm curious. Why go through all of what you wrote when all you need to do
> > is execute the shell script? I'm a Z-shell user and have a bunch of scripts
> > that I run.
> Scripts aren't executed in vacuum. And the question is not limited to SHELL
True. I do not compile any programs, so anything that I need to run that
is clickable are Windows programs.
> > Maybe the secret is not to try and start a script from within a command prompt.
> > Start cygwin xterms.
> Why? I don't need no friggin xterm, I need to run a script.
> Is this a hard concept to grasp?
It is not, which I how I run my scripts, from an xterm command prompt.
All of my scripts have have input, be it an option and/or file to work on.
That is not easily done if the script were clickable. Sure, the script
can ask for input, but that adds time to get it running. Starting it via
the command line saves me lots of time.
I also have scipts that are started via cron. Options are passed to the
scripts from within the scron configuration file.
> > I have two that I start up after booting the system.
> > The scripts are in my home/bin path, so they are found.
> > It is as simple as that.
> Simple as what?
> I don't understand, what "two" you have and what you are actually doing.
Two xterms that are started by clicking on the shortcut that I created that
points to the BAT file that starts an xterm.
> > It is true that they are not "clickable," but entering the script name in
> > the xterm also allows me to also include parameters/options.
> I don't know the name, I have a script that I want to run. Here. Now. Why
> can't I just click it?
You never have to supply your scripts with options and/or files to deal with?
Entering the script name in the xterm is a lot faster than hunting down the
name in explorer (the file manager) or a shortcut on the desktop. If you
have a lot of scripts, your desktop can get cluttered real fast. Mine is
cluttered enough with Windows programs that I use.
I'm and old Unix guy that has grown up with the command line. I find it
fast to use. There are those that hate the command line and prefer to
onlty click on something to get it started.
I guess that is where we differ.
I've provided you with an option. Do with it as you will.
e-mail: email@example.com | firstname.lastname@example.org /~\ The ASCII
email@example.com (140 char limit) \ / Ribbon Campaign
Visit - URL: http://vidiot.com/ X Against
http://vidiot.net/ / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
- Castle - 11/25/13
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin