Visit Our UNIX and Linux User Community

"echo" outputs not appear into Log file

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting "echo" outputs not appear into Log file
# 1  
Old 05-12-2014
"echo" outputs not appear into Log file


- From Script :

echo "************************************"
echo "************************************"
echo "" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "**************************************************************************" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo " [INFO]:`date` - END Updating Workflow and Nodes : " >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "**************************************************************************" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log

if [[ $? != 0 ]] ; then
 echo " [ERROR]: CLONE - Error running clone process. " >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
 exit 1

echo "" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "*****************************************************************************************" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo " [INFO]:`date` -  BEGIN Running AutoConfig on ${NEW_APP_SERVER} : " >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "*****************************************************************************************" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log
echo "" >> /auto_clone/${NEW_ORACLE_SID}/logs/clone_PERP12R.log

# cd /${NEW_ORACLE_SID}/apps/apps_st/comn/clone/bin
export PATH=/usr/ccs/bin:$PATH
# perl appsTier $APPL_TOP/BEZEQ_CUSTOM/${NEW_ORACLE_SID}_${NEW_APP_SERVER}.xml < /auto_clone/apps_pass.txt
./ < /auto_clone/perp12r/new_apps_pass.txt

- From Output file :

NEW_ORACLE_SID :  perp12r
Enter the APPS user password:
The log file for this session is located at: /perp12r/inst/apps/perp12r_erpbr12/admin/log/05120814/adconfig.log
AutoConfig is configuring the Applications environment...
AutoConfig will consider the custom templates if present.
 Using CONFIG_HOME location     : /perp12r/inst/apps/perp12r_erpbr12
 Classpath                   : /perp12r/apps/apps_st/comn/java/lib/
 Using Context file          : /perp12r/inst/apps/perp12r_erpbr12/appl/admin/perp12r_erpbr12.xml
Context Value Management will now update the Context file
 Updating Context file...COMPLETED
 Attempting upload of Context file and templates to database...COMPLETED

"echo" outputs are missing !!

Thank's for your help.

Last edited by Scrutinizer; 05-12-2014 at 09:19 AM.. Reason: code tags
# 2  
Old 05-12-2014
At quick glance, looks like second line/echo is missing close quote.

---------- Post updated at 08:05 AM ---------- Previous update was at 08:02 AM ----------

What are the contents of clone_PERP12R.log?

Last edited by mjf; 05-12-2014 at 10:03 AM.. Reason: Nevermind. This is not an issue as there is a close quote on this line.
# 3  
Old 05-12-2014

2nd Line is OK :


Output :

NEW_ORACLE_SID : perp12r

contents of clone_PERP12R.log : Log file generated while cloning Oracle ERP Instance.

# 4  
Old 05-12-2014
The first three echo statements are going to the current standard output. All subsequent echoes are redirected to a file. The two destinations probably aren't the same, which is why your output sample only shows the first three echo statements.

# 5  
Old 05-12-2014
Do you want output on screen and to a log file?
# echo "Hello world!" | tee /tmp/logfile
Hello world!

# cat /tmp/logfile
Hello world!

# echo "Hello world!" | tee /tmp/logfile              # Overwrites
Hello world!

# cat /tmp/logfile
Hello world!

# echo "Hello world!" | tee -a /tmp/logfile           # Appends
Hello world!

# cat /tmp/logfile
Hello world!
Hello world!



Last edited by rbatte1; 05-12-2014 at 01:38 PM.. Reason: Correcting my poor pasting of output

Previous Thread | Next Thread
Test Your Knowledge in Computers #429
Difficulty: Medium
JavaScript is officially managed by Mozilla Foundation.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

3. Shell Programming and Scripting

How to find a file which are not ends with ".zip" and which are ends with "*.log*" or "*.out*"?

I am new to bash/shell scripting. I want to find all the files in directory and subdirectories, which are not ends with “.zip” and which are contains in the file name “*.log*” or “*.out*”. I know below command to get the files which ends with “.log”; but I need which are not ends with this... (4 Replies)
Discussion started by: Mallikgm
4 Replies

4. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

5. AIX

echo $varibla | mail -s "subject" "" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

Redirect an "echo" to log and screen?

Hi folks. Within a script, i am trying to redirect the output of my commands to both log file and onscreen... Here is the section, where i write to the logfile. But i'd like to send the "echo "Creating LUN $2$COUNTER..." to screen as well... Can that be done? Thanks. { subtitle... (2 Replies)
Discussion started by: Stephan
2 Replies

8. Shell Programming and Scripting

ksh script that echo " please insert your name " and store the output to a login.log file.

Hello All Nice to meet you all here in this forum, it's my 1rst time here i'm asking about a little issue that i face i added a ksh script that echo " please insert your name " and store the output to a login.log file. the script is working fine with normal telnet but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies

9. UNIX for Advanced & Expert Users

fsck.gfs2 outputs "RG recovery impossible; I can't fix this file system"

I have a CentOS release 5.2 (Final)host running kernel 2.6.18-92.el5 with at raid 10 that had two mirrored drives fail. The drives were re-inserted and now the raid shows healthy (for now). I tried to mount but got an Input/output error. I then attempted a fsck: fsck.gfs2 -y /dev/vg_01/uss_vol... (0 Replies)
Discussion started by: king_hippo
0 Replies

10. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

Featured Tech Videos