Sponsored Content
Full Discussion: While $$$$$$
Top Forums Shell Programming and Scripting While $$$$$$ Post 302229602 by era on Wednesday 27th of August 2008 09:31:55 AM
Old 08-27-2008
Given the correct values in $A and $B, that should not be very hard. However, if this needs to happen in a loop, cd:ing back so that the next iteration of the loop works right is a bit of an issue, especially if there may be symbolic links involved. Probably the easiest is to grab pwd into a variable, and cd back to that location at the end of the loop. Another solution is to run each loop iteration in a subshell; the parent's working directory will remain the same throughout. (Hint: use round parentheses to run commands in a subshell.)
 
BACON(1)							       bacon								  BACON(1)

NAME
bacon - small RSpec clone SYNOPSIS
bacon [options] [files | -a] [-- untouched arguments] DESCRIPTION
Ruby options: -e, --eval LINE evaluate a LINE of code -d, --debug set debugging flags (set $DEBUG to true) -w, --warn turn warnings on for your script -I, --include PATH specify $LOAD_PATH (may be used more than once) -r, --require LIBRARY require the library, before executing your script bacon options: -s, --specdox do AgileDox-like output (default) -q, --quiet do Test::Unit-like non-verbose output -p, --tap do TAP (Test Anything Protocol) output -k, --knock do Knock output -o, --output FORMAT do FORMAT (SpecDox/TestUnit/Tap) output -Q, --no-backtrace don't print backtraces -a, --automatic gather tests from ./test/, include ./lib/ -n, --name NAME runs tests matching regexp NAME -t, --testcase TESTCASE runs tests in TestCases matching regexp TESTCASE Common options: -h, --help Show this message --version Show version bacon 1.1.0 July 2011 BACON(1)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy