Sponsored Content
Full Discussion: Revision of script from don
Top Forums UNIX for Dummies Questions & Answers Revision of script from don Post 302973539 by bcarosi on Wednesday 18th of May 2016 01:33:38 PM
Old 05-18-2016
Revision of script from don

Don,

I revised script but when I ran it I did not receive any log. I am not sure what you mean to run it in code tags. I am using a putty session and ssh but I did not get a trace log?

Barb

---------- Post updated at 01:33 PM ---------- Previous update was at 01:27 PM ----------

This is what I revised and it still looped with no log

Code:
 #!/usr/bin/ksh
set -xv
 
ERRORDIR=/home/p611568/d2e/error_directory
 while read -r i
 do  RECIPIENTS="$RECIPIENTS $i@stryder.aessuccess.org"
 done < /home/p611568/d2e/xenos_scripts/emailparm] CODE
 
 RECIPIENTS=bcarosi
 
find /home/p611568/d2e/logs/*.rpt -mtime -10 ! -name '*ftplog*' | while read -r r1
# find /home/p611568/d2e/logs/*.rpt -mtime -8 ! -name '*ftplog*' | while read -r r1
 do  if grep -q CompletionCode "$r1"
     then
         if ! grep CompletionCode "$r1" | grep -q "CompletionCode: Value=0"
         then
             ( echo " There were errors in the following report file for Xenos:"
               echo
               echo "This files have been moved to $ERRORDIR"
               echo "$r1"
             ) | mail -s "$r1" $RECIPIENTS
             mv "$r1" "$ERRORDIR"
         fi
     fi
 done


Moderator's Comments:
Mod Comment Please post in an adequate forum!

Last edited by RudiC; 05-18-2016 at 02:46 PM.. Reason: Corrected code tags / moved thread.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I don't think this would be a problem to script but ...

:confused: I have not written any code in about 15 years. The company I work for has Unix servers and they utilize KSH. The scriptors say that what I want can only be scripted in PERL which on my server they say they cannot get to work. They also tell me that what I want done cannot be... (0 Replies)
Discussion started by: CapnJuan
0 Replies

2. Shell Programming and Scripting

don't know how to implentment as unix sh script

for each file if file name like xx* for each line in a file if substring(3,6) found in another txt file output to file-a( filename = orginal file + _a) else output to file-b( filename = orginal file + _a) end Next Line (4 Replies)
Discussion started by: ttivanwan@yahoo
4 Replies

3. Shell Programming and Scripting

script don't stop

Hello everybody! I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out... (3 Replies)
Discussion started by: larne
3 Replies

4. UNIX for Advanced & Expert Users

don't understand the unix script

if {"$my_ext_type" = MAIN]; then cd $v_sc_dir Filex.SH $v_so_dir\/$v_fr_file Can somebody tell me what does this suggest. I am pretty new to unix and I am getting confused. What i understood from here is If we have a file extension name as MAIN which we have then we change the directory to... (1 Reply)
Discussion started by: pochaman
1 Replies

5. Programming

Revision Control Sw

Hi All, Please let me know any freeware revision control software name and URL. Any response is highly appreciated. OS: Solaris 5.10 Thanks, Naga:cool: (3 Replies)
Discussion started by: Nagapandi
3 Replies

6. Shell Programming and Scripting

revision of copy script to allow for single quote

I have the following script that I use to copy a list of files from one dir to another, #!/usr/bin/bash # $1=filename of file with the list of files to copy # $2=column header for col in list file with filenames (filePath in most cases) # $3=src dir # $3=destination dir FILE_LIST="$1"... (6 Replies)
Discussion started by: LMHmedchem
6 Replies

7. Shell Programming and Scripting

Why don't kill the script after 5s?

# watchdog process mainpid=$$ (sleep 5; kill $mainpid) & watchdogpid=$! sleep 100 kill $watchdogpid The sleep isn't be killed, I want the script to be killed ---------- Post updated at 03:03 AM ---------- Previous update was at 12:04 AM ---------- I just modify the format of my... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

8. 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
echo(1B)					     SunOS/BSD Compatibility Package Commands						  echo(1B)

NAME
echo - echo arguments to standard output SYNOPSIS
/usr/ucb/echo [-n] [argument] DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output. echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi- ronment variables. For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows: o echo your current-working-directory's full pathname o pipe the output through tr to translate the path's embedded slash-characters into space-characters o pipe that output through wc -w for a count of the names in your path. example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w" See tr(1) and wc(1) for their functionality. The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's echo() also understands a as the audible bell character; however, these commands do not have an -n option. OPTIONS
-n Do not add the NEWLINE to the output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5) NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases. SunOS 5.10 3 Aug 1994 echo(1B)
All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy