![]() |
|
|
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 |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 09:29 AM |
| Appending line number to each line and getting total number of lines | chiru_h | Shell Programming and Scripting | 2 | 03-25-2008 10:19 AM |
| Number count per number ranges | shirleyeow | Shell Programming and Scripting | 5 | 12-19-2007 04:06 AM |
| to print number one less than actual number | cdfd123 | Shell Programming and Scripting | 4 | 09-06-2007 07:56 AM |
| number pad in vi | c19h28O2 | SUN Solaris | 5 | 09-21-2006 03:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi
im creating lots of log files, Im writing a script to number them and scp them to a remote server, the files need to be called 0001.log 0002.log etc etc in my script I made a counter variable $counter=00001 I tried adding a number to the variable like this $counter=`echo "$counter + 1" | bc` but this gives me 2 not 0002 i tried with perl also $counter++ does anyone know a simple way to imrement but keep the leding 0's ?? Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|