Sponsored Content
Top Forums UNIX for Beginners Questions & Answers ARP and Bonjour to build list of user devices Post 302993622 by drysdalk on Sunday 12th of March 2017 10:22:11 AM
Old 03-12-2017
Hi,

In general, if a command works at the shell prompt, it should work if that same command is put in a script that is run by that same shell. What might be happening here perhaps is that paths when running via crontab might not be what you'd expect.

If you try in your script putting full absolute paths to all binaries and files, does it then work OK via a crontab entry ? That's probably the first thing to try, since if this approach is working for you at the command line, it should (generally speaking) work in a script as well.

Also make sure the shebang line at the top of your script matches the shell you expect to use to run the script (so #!/bin/bash for Bash, for instance), in case there is a difference between your own shell and the system default shell, or the shell the user is running as in cron.
This User Gave Thanks to drysdalk For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies

2. HP-UX

list of devices

Hi, I need to rediracte all the names of the devices (only disks) to a file. Thanks:confused: (3 Replies)
Discussion started by: yoavbe
3 Replies

3. Shell Programming and Scripting

Run SQL command for a list of devices

Hi Please help me to resolve. Question: I can run this command to change the mode of a device with id=500 as below dbc "select device mode=3 where id=500;" How can i run the same query with a file contaning n number of ids ? file1.txt 12 234 34 500 34 45 Thanks in... (3 Replies)
Discussion started by: sureshcisco
3 Replies

4. Shell Programming and Scripting

Perl - run sub routine for list of devices

Hi, Can anyone please correct the script such that it run on all the devices in the devicelist.txt file. The problem is when the script runs it only reads the first device in the list, configures the device and exists. Script: The devicelist.txt: device.crs... (1 Reply)
Discussion started by: sureshcisco
1 Replies

5. UNIX for Dummies Questions & Answers

Adding SDK Build on Kernel Source Build

Hi, So I downloaded this kernel source and was able to build it successfully. But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself. I added the SDK in the main Makefile: init-y := init/ #added SDK... (0 Replies)
Discussion started by: h0ujun
0 Replies

6. UNIX for Advanced & Expert Users

How to handle build user access/permissions?

All, I am looking for some guidance on how to handle permissions/access for an application build/deployment. We need to allow for software deployments via Visual Studio Team Services and a build server running on Windows, deploying to RHEL 7 servers. We would like to use a service account,... (3 Replies)
Discussion started by: hburnswell
3 Replies
XCODEBUILD(1)						    BSD General Commands Manual 					     XCODEBUILD(1)

NAME
xcodebuild -- build Xcode projects SYNOPSIS
xcodebuild [-project projectname] [-activetarget] [-alltargets] [-target targetname] [-parallelizeTargets] [-activeconfiguration] [-configuration configurationname] [-sdk <sdkfullpath> | <sdkname>] [buildaction ...] [setting=value ...] [-default=value ...] xcodebuild -version [-sdk [<sdkfullpath> | <sdkname> [<single item>]]] xcodebuild -find <binary> [-sdk <sdkfullpath> | <sdkname>] xcodebuild -showsdks xcodebuild -list xcodebuild -help DESCRIPTION
xcodebuild builds a target contained in an Xcode project. Usage Run xcodebuild from the directory containing your project (i.e. the directory containing the projectname.xcodeproj package). If you have multiple projects in the this directory you will need to use -project to indicate which project should be built. By default, xcodebuild builds the first target listed in your project, with the default build configuration. The order of the targets is a property of the project and is the same for all users of the project. The active target and active build configuration properties are set for each user of the project and can vary from user to user. Options -project projectname Build the project specified by projectname. Required if there are multiple project files in the same directory. -activetarget Builds the user's active target. -alltargets Build all the targets in the project. -target targetname Build the target specified by targetname. -nodependencies Only perform the action on the specified target(s), not on any targets upon which they depend. This option only applies to the 'clean' action. -parallelizeTargets Build independent targets in parallel when possible. With distributed builds or multiprocessor machines, this can cause projects with many simple targets to build substantially faster. This option only applies to targets with target dependencies. -activeconfiguration Use the user's active build configuration when building the target. -configuration configurationname Use the build configuration specified by configurationname when building the target. -sdk <sdkfullpath> | <sdkname> Build an Xcode project against the specified SDK, using build tools appropriate for that SDK. The argument may be an absolute path to an SDK, or the canonical name of an SDK. -showsdks Lists all available SDKs, including their canonical names suitable for use with -sdk. buildaction ... Specify a build action (or actions) to perform on the target. Available build actions are: build Build the target in the build root (SYMROOT). This is the default build action. installsrc Copy the source of the project to the source root (SRCROOT). install Build the target and install it into the target's installation directory in the distribution root (DSTROOT). clean Remove build products and intermediate files from the build root (SYMROOT). setting=value Set the build setting setting to value. -find binary -sdk <sdkfullpath> | <sdkname> Print the absolute path to binary in the context of sdk. If the -sdk argument is not provided, find uses the value of the build set- ting SDKROOT, if set. Returns EINVAL if a valid SDK could not be determined. The search order is the usr/bin directory in the SDK, the bin directory in the SDK, then each of the paths specified by the PATH environment variable. Returns ENOENT if the requested binary could not be located in any of the searched directories. NOTE: 'xcrun -find' is preferred because it caches the resulting find; xcrun uses xcodebuild to populate its cache. -version Display version information. When used in conjunction with -sdk, the version of the specified SDK is displayed, or all SDKs if -sdk is given no value. Additionally, a single line of the reported version information may be returned if specified. -default=value Set the user default default to value. -list Lists the targets in the project. Does not initiate a build. -nodistribute Disable distributed building. Overrides the distributed build setting stored in the user defaults by the Xcode preferences panel. -bonjourbuildhosts Enable distributed building and search for build machines using Bonjour. Build machines are added dynamically during the build as they are discovered. May be used alone or in conjunction with -buildhosts or -buildhostsfile. -nobonjourbuildhosts Do not search for build machines using Bonjour. Overrides the Bonjour distributed build setting stored in the user defaults by the Xcode preferences panel. -buildhosts hostlist Enable distributed building and set the list of build machines to the space separated list given in hostlist. -buildhostsfile hostsfile Enable distributed building and set the list of build machines to the contents of hostsfile. hostsfile is a text file containing build machine names, one per line. -help Displays usage information for xcodebuild. EXAMPLES
xcodebuild clean install Cleans the build directory; then builds and installs the first target in the project. xcodebuild -target MyTarget OBJROOT=/Build/MyProj/Obj.root SYMROOT=/Build/MyProj/Sym.root Builds the target MyTarget putting object (intermediate) files in one directory and the products of the build in another directory. xcodebuild -sdk macosx10.4 Builds an Xcode project against the Mac OS X 10.4 SDK. The canonical names of all available SDKs can be viewed using the -showsdks option. Mac OS X April 8, 2008 Mac OS X
All times are GMT -4. The time now is 03:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy