Sponsored Content
Top Forums Shell Programming and Scripting How to run cmds after changing to a new env (shell) in a shell script Post 302246730 by charlei on Tuesday 14th of October 2008 08:42:53 AM
Old 10-14-2008
Hi Franklin

I tried this but I get the error below

./cadenv : not found

regards,
Iniyan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

2. Shell Programming and Scripting

Help need to make a shell script run for ffmpeg vhook watermaking in shell

i have a small problem getting a batxh shell script to run in shell this is the code the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command this is a strange problem , if i take the ffmpeg command and... (1 Reply)
Discussion started by: wingchun22
1 Replies

3. Shell Programming and Scripting

Source Env file in the Shell Script

Hi I am having a script which sets the application environment. In this script i am sourcing the applications env file, when i am debugging the script i see its executing all the environment values and all the variable values are set properply. Once this main shell script executes, then... (4 Replies)
Discussion started by: umakanthly
4 Replies

4. Shell Programming and Scripting

how to reuse a shell script to change env from perl

Hi: I am trying to reuse an existing shell script foo1.csh to set environment variables inside a perl script and its childern processes. Is it possible at all to make those environment variables persistent in the main perl process and its children processes? Do I have to create a new... (4 Replies)
Discussion started by: phil518
4 Replies

5. UNIX for Advanced & Expert Users

problem in Unix Env. in Shell script

sdir;csp os_lib-0.5.24;bdir;cbpdob ---enable-useosstl os_lib-0.5.24;mbp os_lib-0.5.24; If i run this command in unix shell directly it is running. sdir;csp HA_util-0.0.7;bdir;cbpdob ---enable-useosstl HA_util-0.0.7;mbp HA_util-0.0.7; HA_util === Configuring source package HA_util... (4 Replies)
Discussion started by: girija
4 Replies

6. Shell Programming and Scripting

tcsh env setting using shell script

Hi All, I have made a file file usercreate.sh & it has to run in tcsh env & needs some path to be set. my script is as below. ########################## #!/bin/csh setenv PATH "/usr/lib/java/class" setenv LD_LIBRARAY_PATH ########################### but when i am ruuning my script... (1 Reply)
Discussion started by: ajaincv
1 Replies

7. Shell Programming and Scripting

how to set/get shell env variable in python script

greetings, i have a sh script that calls a python script. the sh script sets an env variable BIN: export BIN=bin64i need to get that BIN variable's value and use it within this python script. anyone know how to do this? thanx in advance. (5 Replies)
Discussion started by: crimso
5 Replies

8. AIX

AIX How to run a Shell Script by changing the User

Hi All, Currently our application is running on the server having AIX 5.3 OS. What we intend to do is to run a shell script owned by another user and needs to be run as that particular user. I was trying to create a shell script using the su command before running the actual script (which... (4 Replies)
Discussion started by: acoomer
4 Replies

9. Shell Programming and Scripting

Shell Script for Setting Env Variables

Hello All. Good Afternoon. I need one small help regarding setting of env variables for a particular host by getting it from the DB. For ex : 1. I am using LOCALHOST. 2. When I run a ./hostset.sh it should pick up the Oracle home details from associated DB and set it. Please... (1 Reply)
Discussion started by: PavanPatil
1 Replies

10. Shell Programming and Scripting

Changing shell from a script and running something from the new shell

Hi We use "tcsh" shell . We do the following steps manually: > exec ssh-agent zsh > python "heloo.py" (in the zsh shell) I am trying to do the steps above from a shell script This is what I have so far echo "Executing " exec ssh-agent zsh python "hello.py" exit 0 Problem is... (5 Replies)
Discussion started by: heman82
5 Replies
NPM-RUN-SCRIPT(1)														 NPM-RUN-SCRIPT(1)

NAME
npm-run-script - Run arbitrary package scripts SYNOPSIS
npm run-script <command> [--silent] [-- <args>...] alias: npm run DESCRIPTION
This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts. run[-script] is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts. As of ` https://blog.npmjs.org/post/98131109725/npm-2-0-0, you can use custom arguments when executing scripts. The special option -- is used by getopt https://goo.gl/KxMmtG to delimit the end of the options. npm will pass all the arguments after the -- directly to your script: npm run test -- --grep="pattern" The arguments will only be passed to the script specified after npm run and not to any pre or post script. The env script is a special built-in command that can be used to list environment variables that will be available to the script at run- time. If an "env" command is defined in your package, it will take precedence over the built-in. In addition to the shell's pre-existing PATH, npm run adds node_modules/.bin to the PATH provided to scripts. Any binaries provided by locally-installed dependencies can be used without the node_modules/.bin prefix. For example, if there is a devDependency on tap in your package, you should write: "scripts": {"test": "tap test/*.js"} instead of "scripts": {"test": "node_modules/.bin/tap test/*.js"} to run your tests. The actual shell your script is run within is platform dependent. By default, on Unix-like systems it is the /bin/sh command, on Windows it is the cmd.exe. The actual shell referred to by /bin/sh also depends on the system. As of ` https://github.com/npm/npm/releases/tag/v5.1.0 you can customize the shell with the script-shell configuration. Scripts are run from the root of the module, regardless of what your current working directory is when you call npm run. If you want your script to use different behavior based on what subdirectory you're in, you can use the INIT_CWD environment variable, which holds the full path you were in when you ran npm run. npm run sets the NODE environment variable to the node executable with which npm is executed. Also, if the --scripts-prepend-node-path is passed, the directory within which node resides is added to the PATH. If --scripts-prepend-node-path=auto is passed (which has been the default in npm v3), this is only performed when that node executable is not found in the PATH. If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install, just in case you've forgotten. You can use the --silent flag to prevent showing npm ERR! output on error. You can use the --if-present flag to avoid exiting with a non-zero exit code when the script is undefined. This lets you run potentially undefined scripts without breaking the execution chain. SEE ALSO
o npm help 7 scripts o npm help test o npm help start o npm help restart o npm help stop o npm help 7 config January 2019 NPM-RUN-SCRIPT(1)
All times are GMT -4. The time now is 05:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy