If we take the above line and paste it "as is" into the call to Script B:
then the args get separated as desired.
But if we try to configure a variable with the same contents as the above string AND we want the same result:
then it does not work for me.
Ah. I see now.
The only way to perfectly do what you want is eval, which isn't just awkward, it's dangerous:
Why not just use an array in the first place? Much simpler, much safer.
Hi,
I'm using an array that contains compiler FLAGS
that need to be executed either before ./configure
or after the main 'make' command.
example of array containing compiler flags.
-------------------------------------------------
FLAGS="CFLAGS=\"-arch x86_64 -g -Os -pipe... (7 Replies)
Server: IBM p770
OS: AIX 6.1 TL5 SP1
When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
I have been trying this a lot of different ways and haven't found too much online. Here's what I've got so far:
j=0
declare -a first
zero=(`cat $tmpfile`)
for i in "${zero}"
do
command $i >> "${first}"
... (4 Replies)
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (0 Replies)
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (15 Replies)
The below command moves all the .vcf files into the directory.
cp /home/cmccabe/Desktop/test/vcf/overall/stats/*.vcf /home/cmccabe/Desktop/NGS/annovar
When I use a bash wrapper the target.txt gets created but the text files do not get copied. All the paths are the same, but not sure why... (2 Replies)
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)
OS : RHEL / Oracle Linux 6.8
In bash shell, how can I replace a character under the cursor with another character ?
In the below example , after I typed the following line, I realized that I meant 7013 and not 2013. So I move the cursor to the left and keep it on top of 2 (of 2013) and I want... (7 Replies)
Discussion started by: kraljic
7 Replies
LEARN ABOUT OSX
test::script
Test::Script(3) User Contributed Perl Documentation Test::Script(3)NAME
Test::Script - Basic cross-platform tests for scripts
DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or
bin as is also commonly used) paths of your Perl distribution.
Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible.
That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is
considered unacceptable.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking
that your module won't on some platform because of the dependency.
Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform
safety.
FUNCTIONS
script_compiles
script_compiles( 'script/foo.pl', 'Main script compiles' );
The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl).
This will also be shown in the diagnostic output on failure.
script_runs
script_runs( 'script/foo.pl', 'Main script runs' );
The "script_runs" test executes the script with "perl script.pl" and checks that it returns success.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also
be shown in the diagnostic output on failure.
SUPPORT
All bugs should be filed via the bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script>
For other issues, or commercial enhancement and support, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
prove, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2009-11-23 Test::Script(3)