Sponsored Content
Full Discussion: Problem wit the $? variable
Top Forums Shell Programming and Scripting Problem wit the $? variable Post 302342653 by Scott on Monday 10th of August 2009 11:13:31 AM
Old 08-10-2009
Hi.

Find doesn't return an error in that case.

Try
Code:
find /home/administrator/testfix/install/cc.offering/com.ibm.rational.clearcase.iehs.assembly | xargs grep CCRCWebServerINSTALLDIR
 
echo $?
1

 

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
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy