11-20-2014
Quote:
Originally Posted by
cmccabe
The above code worked great, but now cygwin opens and then closes right away. Is there a better way? Thanks.
If you are working with Windows servers then you should find Windows based solutions. I had to write scripts for Windows 2000 servers and I used Cygwin and Bash, but I put everything into a .bat file making sure to add the C:\Cygwin64\bin or C:\Cygwin\bin directory to my path statement. I can then write a regular .bat script, but use Cygwin tools like rsync and gzip. When you are testing and running the scripts you need to run them from the command prompt otherwise you won't see the output. You should also increase the number of rows buffered on the screen so that you can see more output.
I was talking to another developer about scripting and Windows who said that Powershell on Windows servers have all of the Unix tools, plus the .NET programming stuff. So you may want to look into Powershell. I tried looking at it, but it didn't seem accessable to me, but I have spent most of my career trying to avoid working with Windows servers. Apparently many former Digital Equipment Corp (DEC) programmers went to Microsoft after the demise of DEC and helped to build Powershell to be more Unix like. I don't know if that is true or not.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI,
I have one java program in windows OS. From that java program, I want to run the shell script file in the UNIX OS. Is it possible ??If yes, please post me the source code, how to do that ??
Thanks,
Srinivas (3 Replies)
Discussion started by: srinivas peyyal
3 Replies
2. UNIX for Dummies Questions & Answers
Can I run unix in the same partition with windows xp? Because I have one for now.. Thank you for answers. (2 Replies)
Discussion started by: olddays
2 Replies
3. Shell Programming and Scripting
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
Discussion started by: npatwardhan
3 Replies
4. UNIX for Dummies Questions & Answers
Hey,
For a couple of months, I was using SecureCRT which was satisfying all my needs (keyboard-interactive, sftp ...). Its licence got expired and I no longer want to pay for it.
Is there any SSH program other than Putty, u would suggest as free or less expensive with a user interface like... (3 Replies)
Discussion started by: royalliege
3 Replies
5. Shell Programming and Scripting
Hello,
Running Mac OS X 10.6.8. I have this very simple script within a directory where I play (modify, compile, run) with some java code. When I'm finished I run this script to erase all the .java and .class files and copy clean versions from the subdirectory Backup. I can run this script by... (0 Replies)
Discussion started by: HotPez
0 Replies
6. Shell Programming and Scripting
Hmmm.... I love these forums because I always get great prompt responses and I want to ask a question about running bash on windows. Is that allowed?
Now I know I can install cygwin cron and run bash that way.
Can I run bash from windows schedule task? How?
thanks
siegfried (1 Reply)
Discussion started by: siegfried
1 Replies
7. Debian
HI ! all
I have some model which works fine in windows 7 OS with matlab program I want to run all those from Ubuntu 12.04 32-bit OS.
is there any provision to run windows applications? wine I tried, its not working, if any other available kindly explain the usage also
Note : Dual boot ... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies
8. Shell Programming and Scripting
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies
9. Shell Programming and Scripting
Hi all,
I have a script has been writing for Unix or Linux. Now I want to run under Windows 10. is give me Error:
if:Badly formed number
How to fix this please help
*** This is a copy of a part of Script.
set absolute_gap = 0
if ($min_p_to_p != "" && $min_p_to_p != "N/A" && $min_p_to_t... (5 Replies)
Discussion started by: dovo
5 Replies
LEARN ABOUT DEBIAN
ppmtowinicon
ppmtowinicon(1) General Commands Manual ppmtowinicon(1)
NAME
ppmtowinicon - convert 1 or more portable pixmaps into a Windows .ico file
SYNOPSIS
ppmtowinicon [-andpgms] [-output output.ico] [ppmfiles...]
DESCRIPTION
Reads one or more portable pixmaps as input. Produces a Microsoft Windows .ico file as output.
A Windows icon contains 1 or more images, at different resolutions and color depths.
Microsoft recommends including at least the following formats in each icon (size and bits-per-pixel):
16 x 16 - 4 bpp
32 x 32 - 4 bpp
48 x 48 - 8 bpp
Default I/O is STDIN/STDOUT.
OPTIONS
-andpgms
If this option is given, every second file is read as an "and mask" to be used by windows for transparency data for the previous
image. (These are set to fully opaque by default). The and mask is a PGM image, where any pixel with maxval intensity means opaque
and any other pixel means not opaque. Note that as with all Netpbm programs, you may use a PBM file here and it will be used as if
it were the equivalent PGM.
The and mask is like an alpha mask, except for what it signifies in the "not opaque" areas. In the usual case, the foreground image
is black in those areas, and in that case the areas are fully transparent -- the background shows through the icon. But in general,
a not opaque pixel signifies that the background and foreground should be merged as follows: The intensities of the color components
in the forgeground and background are represented as binary numbers, then corresponding bits of the background and foreground inten-
sities are exlusive-or'ed together. So there is a sort of reverse video effect.
-output output.ico
File to write. By default, the icon is written to stdout.
SEE ALSO
winicontoppm(1), ppm(5)
AUTHOR
Copyright (C) 2000 by Lee Benfield.
22 May 2000 ppmtowinicon(1)