04-16-2010
Windows environment != Cygwin environment
The variable you read in the first line is set only within that bash process, and is lost as soon as it exits (which is immediately afterwards)
You can put multiple independent statements on the same line by separating them with a semicolon, OR you could go the smart way, and put all needed statements into a script which you then call.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, all,
I try to run a quite simple bash script mytest.sh in cygwin, it's content is:
#!/bin/bash
echo "It is my first bash shell"
there are three lines in the script. The second line is blank line.
When I run it use command: bash c:/mytest.sh, ... (6 Replies)
Discussion started by: Jenny.palmy
6 Replies
2. UNIX for Dummies Questions & Answers
I am running (I believe) the latest stable version of cygwin
CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
on a win xp sp2 laptop.
Suppose, to make things simple for now (but I may do a part 2 posting...), that I am in a dos shell, and I want to create a bash shell and have it... (1 Reply)
Discussion started by: fabulous2
1 Replies
3. Shell Programming and Scripting
I'd like to streamline the code more than a bit to get it to run faster.
There's a thread about this and related issues of mine on the Cygwin mailing-list, but I want to eliminate any chances it might just be inefficient/inelegant/crappy code. A previous run of the same script on both Cygwin and... (6 Replies)
Discussion started by: SilversleevesX
6 Replies
4. Shell Programming and Scripting
Hello,
In my make file (make 3.81), I use a combination of shell commands to automatically create the name of my build directory.
OS := $(shell uname -s)
ARCH := $(shell uname -m)
KERN := $(shell uname -r | cut -d. -f 1,2)
BDIR := $(OS)_$(KERN).$(ARCH)When I boot into different OSs, I... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
5. Shell Programming and Scripting
I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like,
echo "Runtimes for servlet 4, 100K structures" > test_times.txt
echo "" >> test_times.txt
echo "runs where N=10" >> test_times.txt
echo... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
6. Windows & DOS: Issues & Discussions
I'm using Notepad++ to edit my BASH scripts and using CYGWIN to run them from Windows7.
In Notepad++ there is a 'Run' capability. How do I get this to run my scripts directly without having to enter the script name from the Cygwin command line? (3 Replies)
Discussion started by: millsy5
3 Replies
7. Shell Programming and Scripting
As stated, I am looking into keeping my backup drive unmounted in normal windows use. Partly this is to address threats like cryptolocker. Since one of my backup drives is an internal drive, it will not likely afford any protection from such a threat. I am thinking of adding code to my rsync script... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
8. Shell Programming and Scripting
All,
Have a weird issue where i need to generate a report from GitHub monthly detailing user accounts and the last time they logged in. I'm using a windows box to do this (work issued) and would like to know if anyone has any experience scripting for GitAPI using windows / cygwin / powershell?... (9 Replies)
Discussion started by: ChocoTaco
9 Replies
9. Shell Programming and Scripting
Hi everybody,
First, I'm sorry for my bad english!
I have the following situation:
I have a Windows 2012 R2 with Cygwin installed. The Windows Server is used as a backup Server with Dell AppAssure installed. At the moment, AppAssure saves Backup Targets to a repository on his D. The... (9 Replies)
Discussion started by: fibra3000
9 Replies
10. UNIX for Beginners Questions & Answers
I am trying to use a batch file to automatically execute a bash script with no luck this far.
The batch script looks like this:
C:\Cygwin64\bin\bash test.sh
I have also tried this:
C:\Cygwin64\bin\bash "C:\Cygwin64\bin\test.sh"
Needless to say that the windows box has Cygwin... (7 Replies)
Discussion started by: Xterra
7 Replies
LEARN ABOUT DEBIAN
autoheader2.13
AUTOHEADER(1) General Commands Manual AUTOHEADER(1)
NAME
autoheader2.13 - creates a template file of C #define's for use by configure.
SYNOPSIS
autoheader2.13 [ --help | -h ] [ --localdir=dir | -l dir ] [ --macrodir=dir | -m dir ] [ --version ]
DESCRIPTION
The autoheader2.13 program can create a template file of C #define statements for configure to use. If configure.in invokes AC_CON-
FIG_HEADER(FILE), autoheader2.13 creates FILE.in; if multiple file arguments are given, the first one is used. Otherwise, autoheader2.13
creates config.h.in.
If you give autoheader2.13 an argument, it uses that file instead of configure.in and writes the header file to the standard output instead
of to config.h.in. If you give autoheader2.13 an argument of -, it reads the standard input instead of configure.in and writes the header
file to the standard output.
autoheader2.13 scans configure.in and figures out which C preprocessor symbols it might define. It copies comments and #define and #undef
statements from a file called acconfig.h, which comes with and is installed with Autoconf. It also uses a file called acconfig.h in the
current directory, if present. If you AC_DEFINE any additional symbols, you must create that file with entries for them. For symbols
defined by AC_CHECK_HEADERS, AC_CHECK_FUNCS, AC_CHECK_SIZEOF, or AC_CHECK_LIB, autoheader2.13 generates comments and #undef statements
itself rather than copying them from a file, since the possible symbols are effectively limitless.
The file that autoheader2.13 creates contains mainly #define and #undef statements and their accompanying comments. If ./acconfig.h con-
tains the string @TOP@, autoheader2.13 copies the lines before the line containing @TOP@ into the top of the file that it generates. Simi-
larly, if ./acconfig.h contains the string @BOTTOM@, autoheader2.13 copies the lines after that line to the end of the file it generates.
Either or both of those strings may be omitted.
An alternate way to produce the same effect is to create the files FILE.top (typically config.h.top) and/or FILE.bot in the current direc-
tory. If they exist, autoheader2.13 copies them to the beginning and end, respectively, of its output. Their use is discouraged because
they have file names that contain two periods, and so can not be stored on MS-DOS; also, they are two more files to clutter up the direc-
tory. But if you use the --localdir=DIR option to use an acconfig.h in another directory, they give you a way to put custom boilerplate in
each individual config.h.in.
autoheader2.13 accepts the following options:
--help
-h Print a summary of the command line options and exit.
--localdir=DIR
-l DIR Look for the package files aclocal.m4 and acconfig.h (but not FILE.top and FILE.bot) in directory DIR instead of in the current
directory.
--macrodir=DIR
-m DIR Look for the installed macro files and acconfig.h in directory DIR. You can also set the AC_MACRODIR environment variable to a
directory; this option overrides the environment variable.
--version
Print the version number of Autoconf and exit.
SEE ALSO
autoconf2.13(1), autoreconf2.13(1), autoscan2.13(1), autoupdate2.13(1), ifnames2.13(1)
AUTHORS
David MacKenzie, with help from Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, Roland McGrath, Noah Friedman, David D.
Zuhn, and many others. This manpage written by Ben Pfaff <pfaffben@debian.org> for the Debian GNU/Linux autoconf2.13 package.
Autoconf AUTOHEADER(1)