Sponsored Content
Full Discussion: Problem wit the $? variable
Top Forums Shell Programming and Scripting Problem wit the $? variable Post 302342652 by asirohi on Monday 10th of August 2009 11:10:00 AM
Old 08-10-2009
Problem wit the $? variable

Hi Friends,

I have a problem when i run this piece of script, and do echo $? it always gives me value 0, even if the string "CCRCWebServerINSTALLDIR" is not present in that file. Why is that so, can you give me suggestion to the changes i need to make?


Code:
$find /home/administrator/testfix/install/cc.offering/com.ibm.rational.clearcase.iehs.assembly -exec  grep CCRCWebServerINSTALLDIR {} \;

Thanks
Adi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help me in this variable problem

suppose i declare a=b b=30 echo $(echo $a) i need to get the value as 30 i dont know if im right but it prints only 'b' as output. How can i get the value referred by 'b' through the value of 'a' (4 Replies)
Discussion started by: SankarV
4 Replies

2. UNIX for Dummies Questions & Answers

Variable Size Problem

Hello Everyone, I am currently working with a DB2 (ver 8.1) table (Newly Created) and I am running a basic DB2 Select query into a variable. The field and it's size are VARCHAR(20). Since I need to pass the variable through some java I have noticed that when the results come back from the query... (0 Replies)
Discussion started by: Bob_Loblaw
0 Replies

3. UNIX for Dummies Questions & Answers

Variable assignment problem

Hi, I am having a problem with assigning a value to a variable. The empname is looked for in the employees file and I am trying to assign it to the jobnum variable in the following statement jobnum= cat/etc/employees | grep $empname | cut -d : -f 5 It is getting the right answer but it is... (3 Replies)
Discussion started by: rodney08
3 Replies

4. Shell Programming and Scripting

Problem with variable use

Hi, I need a little help with variable use: I have the a file with follow format: Type: Test Profile: 010 84240 27 15 84900 11 09 84993 55 44 84762 12 12 I need to look the value in the line containing "Profile" and put in front of the lines containing numbers... (6 Replies)
Discussion started by: cgkmal
6 Replies

5. Shell Programming and Scripting

Problem with * when pass into variable.

Hello expert. I have a little problem here. I write a script and stuck some bug to fix. I found the problem was about * and a sample of script is below. line 1 is print * out but line 3 print all name of files in the script's path. (but I want *) I want to contain * in variable... (3 Replies)
Discussion started by: MaYuMi
3 Replies

6. Shell Programming and Scripting

Problem with variable value

Can anyone help me?...I don't know why the second 'echo $contador' always shows 0 (zero): 1 #!/bin/bash 2 contador=0 3 while read linea 4 do 5 echo 6 echo "$linea" | while IFS="" read -n 1 caracter 7 do 8 contador=$((${contador}+1)) 9 echo $contador... (5 Replies)
Discussion started by: albertogarcia
5 Replies

7. Linux

Partition of linux filesystem wit meaning

Cud some one pls help me wit some partitions of linux filesystem wit their meaning....urgent cos is an assignment (5 Replies)
Discussion started by: GODBLESSME
5 Replies

8. Shell Programming and Scripting

Problem with a variable withing a variable

hello there, basically im screwed with a variable that should take the last modification date of a file. my code is fileCreationTime=$(( `ls -l $fileName | tr -s " " | cut -d " " -f6` )) my problem arise coz when the code is executed and stored in a file the return value is 1993 and not... (4 Replies)
Discussion started by: thurft
4 Replies

9. Shell Programming and Scripting

Variable print problem

Hi, I'm facing some problem with printing the values in the variables I have passed all the database values into the variable, but when i echo the variable i get the values printed in one line var=`echo <query> | database` echo $var or awk 'BEGIN {printf("%s\n","'"${var}"'")}' this... (4 Replies)
Discussion started by: prash_b
4 Replies

10. Shell Programming and Scripting

problem in assigning value to variable have value fo other variable

my script is some thing like this i11="{1,2,3,4,5,6,7,8,9,10,11,}" echo "enter value" read value ..............suppose i11 x="$value" echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,} but its showing "i11" only. plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 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:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy