![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Padding Carriage return to the end of XML file | dasj22 | UNIX for Advanced & Expert Users | 3 | 05-23-2008 10:31 AM |
| Issue with Removing Carriage Return (^M) in delimited file | sirahc | UNIX for Advanced & Expert Users | 7 | 03-25-2008 05:08 AM |
| add carriage return at end of file | HAA | Shell Programming and Scripting | 2 | 11-20-2007 11:58 AM |
| Removing Carriage Return and or line feed from a file | tbone231 | Shell Programming and Scripting | 1 | 02-18-2005 04:37 PM |
| Removing carriage return characters from file | b1saini | UNIX for Dummies Questions & Answers | 3 | 09-10-2003 10:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 month=`date +%m` year=`date +%y` ((pmonth=month-1)) rm $outdir/date.txt day=1 while((day<(lasts[pmonth]))) ; do dday=$day dmonth=$pmonth echo ${dmonth}/${dday}/${year} >> $outdir/date.txt ((day=day+1)) done dday=$day dmonth=$pmonth echo ${dmonth}/${dday}/${year}"\c" >> $outdir/date.txt Thanks for everyone help! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|