shell script no output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting shell script no output
# 1  
Old 01-18-2010
shell script no output

xxxxxx

Last edited by vinayrao; 05-28-2010 at 03:52 PM.. Reason: Code tags, PLEASE!
# 2  
Old 01-18-2010
As I see it, the only echo you have is in a case statement "default" case - which is never "the case". Every other echo is in a function you never call, or which return before actually echoíng anything.

Last edited by Scott; 01-18-2010 at 05:45 PM..
# 3  
Old 01-18-2010
Thanks for the response

xxxxxx

Last edited by vinayrao; 05-28-2010 at 03:53 PM..
# 4  
Old 01-18-2010
This script checks for the presence of certain commands and if all is well it does not throw an exception. It also sets various variables, so I think it is meant to be sourced by other scripts so that the variables can be used. It is not meant to produce output.

To source means to call it from within another script, like so:

Code:
#!/bin/sh
. ./checkscript
# Below you put your own script code that can reference 
# the variables and functions set by the check script
....

# 5  
Old 01-18-2010
Thanks Scrutinizer

xxxxxxx

Last edited by vinayrao; 05-28-2010 at 03:53 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shell script to call and sort awk script and output

I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies

2. Shell Programming and Scripting

A shell script to run a script which don't get terminated and send a pattern from the output by mail

Hi Guys, I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies

3. Shell Programming and Scripting

Shell Script function to use script name for log file output

Hi Team - I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n? %~n is a DOS variable that dispayed the script name. For instance (in DOS): REM... (11 Replies)
Discussion started by: SIMMS7400
11 Replies

4. Shell Programming and Scripting

Customize the Shell Script output

Hello guys. about two weeks ago i had a question about customizing output and thanks to you guys i could solve it. now i have a similar question but this time its little complex. this is my output: -------------------+--------------------+---------+--------- ias-component | process-type ... (3 Replies)
Discussion started by: Ymir
3 Replies

5. Shell Programming and Scripting

how to duplicate an output in shell script

how to duplicate an output from a shell command? for example: `date` will give the current date to the console. I want this to be displayed in console and also parallely store it in file or variable. user1@solaris4:~> date Tue Feb 28 17:48:31 EST 2012 user1@solaris4:~> date > file ... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

6. Shell Programming and Scripting

Shell Script output

Hi All, Below is the shell script for which desired output is required: Shell script: #!/bin/bash . /oracle/TEST/db/tech_st/11.1.0/TEST_<hostname>.env sqlplus /nolog << EOF connect / as sysdba spool /home/oracle/db_output.log @lockwait.sql prompt Database Locks ... (1 Reply)
Discussion started by: a1_win
1 Replies

7. Shell Programming and Scripting

Shell Script to Filter Output

Hi guys - I use this script below to search for files that are of todays date. It also informs if the file doesnt exist or is old. I am trying to make the script inform of the errors in the "begining" of the output email. Such as all errors are grouped together. I am using the following... (1 Reply)
Discussion started by: DallasT
1 Replies

8. Shell Programming and Scripting

Using output of perl script in shell

Hi, I have a perl script which prints the epoch value of given date. I want to use its output in a shell script.Can someone suggest me how to do it. Thanks and Regards Jyothi (4 Replies)
Discussion started by: jyothi_wipro
4 Replies

9. Shell Programming and Scripting

[How To?] Run shell script and get output into another shell.

Hi guys, I have a simple question, I want to store the output of the following command: As you can see it is running all the time, and we get a new line every 3sec. I just want to store these new lines into a single variable, so I can use it into a script. To clear the screen, and... (4 Replies)
Discussion started by: Thireus
4 Replies

10. Shell Programming and Scripting

Shell Script Output

I'm trying to automate numerous grep searches via shell scripting. However, the output of echo is ONE line whereas grepping from the command line would give line breaks as seen in the file. For example: test.txt: 12345 - hi 12345 - how 54321 - are 12345 - you grep output would be:... (4 Replies)
Discussion started by: sharpi03
4 Replies
Login or Register to Ask a Question