Hiding error report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Hiding error report
# 1  
Old 09-03-2010
Hiding error report

Hi Guys,

Error report is still displaying on the console after executing the below command. Is there any error in the syntax?

Code:
check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt | g
rep "Test Cases FAIL" | cut -c 18-) 2> log2

# 2  
Old 09-03-2010
Quote:
Originally Posted by ajincoep
Hi Guys,

Error report is still displaying on the console after executing the below command. Is there any error in the syntax?

Code:
check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt | g
rep "Test Cases FAIL" | cut -c 18-) 2> log2

What kind of error do you get?
# 3  
Old 09-03-2010
I do not want the error report to display on the console. But it is still displaying....
# 4  
Old 09-03-2010
It could be an error of cat, grep or cut.

Try to redirect the error of the commands e.g. for the cat command:
Code:
check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt 2> log2| grep "Test Cases FAIL" | cut -c 18-)

# 5  
Old 09-03-2010
Quote:
Originally Posted by ajincoep
Hi Guys,

Error report is still displaying on the console after executing the below command. Is there any error in the syntax?

Code:
check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt | grep "Test Cases FAIL" | cut -c 18-) 2> log2

why exactly do you need a 'cat'?
Code:
check_event=$(grep "Test Cases FAIL" /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath 2> log2| cut -c 18-)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Password hiding in UNIX

Hi guys, I use STTY command to make the password invisible. Now I need to write the password into another file pwd.txt, but in an invisible manner, something like ******. Another thing is to when I echo the content of pwd.txt I get the password I actually typed. Thanks guys. Help me out. (5 Replies)
Discussion started by: mohanalakshmi
5 Replies

2. UNIX for Dummies Questions & Answers

Hiding history of my commands

i have several boxes running either ubuntu, redhat or solaris. there are multiple people with root access on these boxes. i really dont like people looking through my command history, is there a way i can prevent this? what files do i have to edit to prevent anyone from being able to see what... (7 Replies)
Discussion started by: SkySmart
7 Replies

3. Programming

C++ overriding Vs hiding

class B { public: void fns(void){//base def;} }; class D:public B { public: void fns(void) {//new def;} }; I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding? This is the exact statement ... (1 Reply)
Discussion started by: johnbach
1 Replies

4. UNIX for Dummies Questions & Answers

Hiding Password

Hello. A bit of a puzzle here: I have a 3rd party executable, which requires the following parameters: parm1 = program_name, parm2=userid/password, parm3=additional flags. We tried passing password as a variable, but you can do grep, and see what the password actually is I found a bit... (2 Replies)
Discussion started by: Kishinevetz
2 Replies

5. Shell Programming and Scripting

Hiding the Directory

Hi, I have a directory i want to just hide this directory. Could you please tell me the command to hide directory. (2 Replies)
Discussion started by: shivanete
2 Replies

6. Shell Programming and Scripting

Bourne Shell: Hiding error messages

I am executing commands as follows in Bourne shell script. Filenames/directory names for the deletion/copying are unknown: rm * rmdir <directory> cp -p * <directory> Sometimes when no file or directory exists, error is encountered. This has no impact or whatever issue to my script but it's... (5 Replies)
Discussion started by: totziens
5 Replies

7. UNIX for Advanced & Expert Users

Hiding Passwords while typing..

Hi, We need ur advice,... We are integrating our application (oracle) with OID,and OID is with another team. While integrating they have to provide their 'ADMIN-password' when the script prompts ,But the password they are about type is visible. If this is the case they are denying it,.... Is... (1 Reply)
Discussion started by: rrs
1 Replies

8. IP Networking

Hiding an IP address

Is there anyone who knows how to hide an IP from being logged by the site you are visiting. I know of some paid companies but I am looking for a different solution. Is there some way in UNIX to mask the ip. Help this is urgent. Datopdog (1 Reply)
Discussion started by: datopdog
1 Replies

9. Shell Programming and Scripting

hiding sqplus paramters

Any have know how to hide the user/password paramters when doing a ps -ef when running sqlplus username/password@db from a script. (2 Replies)
Discussion started by: jinky
2 Replies

10. Shell Programming and Scripting

Hiding password from ps

I'm calling a program with a command line arguement containing a password. while the process is running anyone on the system can ps -ef and see the password. Is there a way to prevent this from happening. example PROGRAM USERNAME/PASSWD I've also tried PROGRAM `cat passfile` ... (7 Replies)
Discussion started by: sudojo
7 Replies
Login or Register to Ask a Question