Hi, I have a script that outputs a file that contains the dates from the previous month, which is then used by our application to run processes on each date contained in the file. My problem is is that my script created a blank line at the bottom of the file which causes issues for our application. I'm looking for suggestions on how to stop or remove the last line/carriage return. Any suggestions are appreciated. Thanks!
I think it's my text editor (UltraEdit) displaying the file improperly, because it I use VI there is not a lbank line. But my application is seeing a blank line also when reading this file. I'm rather confused now. I may end up manully editing the file on a monthly basis
I believe I figured out the problem. The echo command places a new line character at the end of each iteration thru the loop. I just needed to suppress the new line char for the last date. Lines changed and/or added in bold below...
outdir=/testg1/scripts
# ja fe ma ap ma ju ju ag se oc no de
set -A lasts 0 31 28 31 30 31 30 31 31 30 31 30 31
typeset -Z2 dmonth dday