Still print hello2, how to modify this


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Still print hello2, how to modify this
# 1  
Old 04-17-2013
Still print hello2, how to modify this

I want it not print hello2,but for now it print, how could I do,not I want if exit 8 then exit to the whole shell, and don't want to move "exit" from the {}

Code:
#!/bin/sh

start_test()
{
        {
                echo "hello1"
                exit 8
        } |tee -a qqq
        echo hello2
}

start_test


Last edited by yanglei_fage; 04-17-2013 at 03:55 AM..
# 2  
Old 04-17-2013
It's very hard to understand what you are exactly trying to ask. Can you please re-phrase your question better?

Guru.
# 3  
Old 04-17-2013
Quote:
Originally Posted by guruprasadpr
It's very hard to understand what you are exactly trying to ask. Can you please re-phrase your question better?

Guru.
update
# 4  
Old 04-17-2013
Quote:
update
It's really not clear. The code is obscure and over-complex, whatever you are trying to do.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ed to modify a file --- or not?

Running Oracle Linux 6 (derivative of RHEL 6) Given this snippet of code in a shell script: #-- reset oratab to use 11.2 home for dwdev #-- normally we'd just use sed to do this sort of thing, but that would #-- require permissions that we don't have in the /etc/ directory, so we #-- ... (3 Replies)
Discussion started by: edstevens
3 Replies

2. Shell Programming and Scripting

File modify

Hi All I am getting a file with below pattern - 00150366 05/08/2015 07:14:32 8000186167+++ 50195281000000000371001010903236 800186167+++ 100209000000000 800000018617+++ 50295281000000000371001010900217================================3u4398482344334=432434 00150367 05/08/2015 07:14:32... (7 Replies)
Discussion started by: honey26
7 Replies

3. UNIX for Dummies Questions & Answers

How to create a print filter that print text & image?

Currently, I have a print filter that takes a text file, that convert it into PCL which then gets to a HP printer. This works. Now I need to embedded a image file within the text file. I'm able to convert the image file into PCL and I can cat both files together to into a single document... (1 Reply)
Discussion started by: chedlee88-1
1 Replies

4. Shell Programming and Scripting

Modify print of command "ls -l -R"

Hi to all, Some help please, I want to modify using awk the print showed by command "ls -l -R" from: /home/user1/Mydocs/Year/2010/July/Experiments: total 1608 -rw-r--r-- 1 user1 user1 1431 Feb 2 22:45 Experiments1.TAR -rw-r--r-- 1 user1 user1 923 Feb 2 22:45 Tests_Exp1.TXT... (4 Replies)
Discussion started by: cgkmal
4 Replies

5. Shell Programming and Scripting

print first few lines, then apply regex on a specific column to print results.

abc.dat tty cpu tin tout us sy wt id 0 0 7 3 19 71 extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0 0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies

6. Shell Programming and Scripting

about the modify lines

Hello, I am trying to convert lines from text file, I got lines in text files like that ALPHA.cab tomtom.cab vgame.cab converter.cabWhat i want to do is I want to conver these lines like that, cabwiz.exe ALPHA.cab extract "C:\1extract\ALPHA" cabwiz.exe tomtom.cab extract ... (5 Replies)
Discussion started by: davidkhan
5 Replies

7. UNIX for Dummies Questions & Answers

Modify Path

Hi, This is certainly a simple question, but I have yet to receive sufficient info concerning it. I am using BASH on a Powerbook G4 running Leopard. - I would like to permanently add a directory to my path. How do I do this? - I understand that I can view my path by: echo $PATH. Is there a... (4 Replies)
Discussion started by: msb65
4 Replies

8. Shell Programming and Scripting

Trying to modify a print filter!

Ok, the filter looks like this. awk ' BEGIN{printf ("^ This is sending escape sequences to the printer. What I also would like to do is filter out certain pages. I only want the contant between two markers. Start Marker=1Q2Q3Q4Q, End Marker=5Q6Q7Q8Q. I also need the actual line that... (0 Replies)
Discussion started by: djsal
0 Replies

9. HP-UX

Print Problem in UNIX. Need to know the option to specify the print paper size

Hi, Could any one please let me know what is the option available in UNIX to print by specifying the paper size? We are using Unix11i. I could n't see any option specified in the 'lp' command to print the report by specifying the size of the paper. It would be of great help to me, if... (1 Reply)
Discussion started by: ukarthik
1 Replies

10. AIX

Modify Print Orientation, Font and Pitch

I need to be able to change the font, pitch, and orientation when printing a text flat file. Any suggestions appreciated. (2 Replies)
Discussion started by: mad_dog
2 Replies
Login or Register to Ask a Question