![]() |
|
|
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 |
| About compatibility of HP-UX 11i | Irene Martínez | HP-UX | 0 | 02-29-2008 01:05 PM |
| Disks compatibility | ppass | SUN Solaris | 0 | 12-05-2007 05:00 AM |
| Program Compatibility | Elliandr | Filesystems, Disks and Memory | 4 | 01-11-2006 07:41 AM |
| Linux & Unix Compatibility | doyho | UNIX for Dummies Questions & Answers | 6 | 08-09-2002 11:33 AM |
| Motherboard Compatibility | hbosch | Filesystems, Disks and Memory | 1 | 03-25-2002 06:37 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hi!
i have two problems with the following script who prepares a date (removes the heading zero from day if day<10) for arithmetical operations: <script> #!/usr/bin/sh DAY=`date +%d`; echo 1 - $DAY;#i.e. 06 DAY=${DAY#0}; echo 2 - $DAY;#i.e. 6 </script> 1. every time i run this script on SunOS 5.7 (SPARC) i get a 'bad substitution' error (only) if the first line isn't blank 2. every time i run this script on SunOS 5.6 (SPARC) i get a 'bad substitution' error (no matter if the first line in blank or not) thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|