Sponsored Content
Full Discussion: Scripts without shebang
Top Forums Shell Programming and Scripting Scripts without shebang Post 302694537 by CarloM on Friday 31st of August 2012 02:26:33 AM
Old 08-31-2012
Note that if the script is sourced (e.g. . /path/to/script.sh) rather than run as an executable file then it will be run in the current shell.
This User Gave Thanks to CarloM For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shebang

Hi, I am currently writing BASH shell scripts. I am using BASH on a Powerbook G4 running Leopard. Could somebody please explain the difference between #!/bin/bash and #!/bin/sh? I have been using the latter (#!/bin/sh), and things have been working fine. But is that the correct one to use... (9 Replies)
Discussion started by: msb65
9 Replies

2. Shell Programming and Scripting

Doubt in shebang line!!

Do we need to include the exclamatory mark in the shebang line??:confused: What if we dont include it??:eek: Actually what shebang line implies when we run a script?? shebang line--> #!/bin/ksh :p (6 Replies)
Discussion started by: nohup
6 Replies

3. Shell Programming and Scripting

Relacing the shebang line of a file

Can any one tell me how to replace a shebang line of a file using sed? Eg: If a file contains the following shebang line #!C:/InstantRails/ruby/bin/ruby I would like to replace it with #!/usr/local/bin/ruby The shebang line of the file can be obtained from the command cat... (3 Replies)
Discussion started by: linuxnewbe
3 Replies

4. Shell Programming and Scripting

Multiple shebang lines

*** EDIT: I found something close to my solution under an IIS 7 Module Handle.***** (Non-Homework question, simply an ease of use one) Odd question here and maybe its my newness to cgi/Perl, but is it possible to have 2 shebang lines? I write an test a ton of my homework code on my windows... (1 Reply)
Discussion started by: sennex
1 Replies

5. Shell Programming and Scripting

The Shebang!

Hi, I always thought that #!/usr/bin/ksh means that the script would be executed in korn shell i.e. when we'll execute the script with this line as the very first line then the shell spawns a korn shell (in this case as we are using #!/usr/bin/ksh ) and the script gets executed. But I am... (7 Replies)
Discussion started by: dips_ag
7 Replies

6. Shell Programming and Scripting

Hyphen char after shebang notation

Hi, I have a trivial question to ask, I am seeing in some shell scripts the '-' (hyphen) character following the first line of shell script (i.e) the shebang notation as follows: #!/bin/sh - #! /bin/bash - what does the hyphen signify? What will happen if it is not given explicitly? (2 Replies)
Discussion started by: royalibrahim
2 Replies

7. Shell Programming and Scripting

Shebang

If i am not using #! in my script. By default where will be my script running? (6 Replies)
Discussion started by: Kochu77
6 Replies

8. Shell Programming and Scripting

csh shebang query

What does the "-f" mean in following interpreter code #!/bin/csh -f Thank you (2 Replies)
Discussion started by: animesharma
2 Replies

9. Shell Programming and Scripting

Necessity of shebang line

Hi , I know about the shebang line in shell scripting. Just want to know whether is there any difference in execution of the program by keeping and not keeping the shebang line. Because without shebang line also the script is working. correct me if am wrong. Any help on this will be helpful (5 Replies)
Discussion started by: rogerben
5 Replies
RunTargetUnitTests(1)					    BSD General Commands Manual 				     RunTargetUnitTests(1)

NAME
RunTargetUnitTests -- run unit tests for the current target SYNOPSIS
RunTargetUnitTests DESCRIPTION
RunTargetUnitTests examines its environment and runs the unit tests it presumes are present using otest(1). RunTargetUnitTests is intended to be called from a shell script build phase. It expects certain environment variables to be configured from Xcode build settings (see below). RunTargetUnitTests will run tests for all built architectures appropriate for the machine running the tests. ENVIRONMENT
ARCHS The architectures the tests were built for; when tests are run, they will be run once per architecture. If unspecified, tests are run for the architecture returned by arch(1). DEVELOPER_DIR The Xcode folder, e.g. "/Developer". If unspecified the value for SYSTEM_DEVELOPER_DIR will be used, or "/Developer" if that also is unspecified. BUILT_PRODUCTS_DIR The directory containing built products; when tests are run, this is specified in DYLD_FRAMEWORK_PATH. If unspecified tests are run from the current working directory with no DYLD_FRAMEWORK_PATH. FULL_PRODUCT_NAME The full name of the built product, including its wrapper extension if any. GCC_ENABLE_OBJC_GC Whether or not the test bundle was compiled with Objective-C garbage collection enabled. Possible values are unsupported, supported, and required. If not set, defaults to unsupported, which will run otest(1) with Objective-C garbage collection disabled. NATIVE_ARCH_ACTUAL The architecture of the machine running the tests, used to determine for which architectures tests can be run. If unspecified, defaults to the architecture returned by arch(1). OTEST The path to the otest command line tool; defaults to /Developer/Tools/otest. TEST_AFTER_BUILD Set to YES to run tests, any other value will prevent test execution. FILES
/Developer/Tools/RunTargetUnitTests The script used to run tests from a shell script build phase. /Developer/Tools/otest The OCUnit test rig. SEE ALSO
arch(1), otest(1) Mac OS X June 2, 2019 Mac OS X
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy