![]() |
|
|
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 |
| date comparision | Hitesh Shah | SUN Solaris | 1 | 10-26-2007 08:35 AM |
| alphanumeric comparision | rakeshou | Shell Programming and Scripting | 3 | 09-27-2007 12:32 PM |
| date comparision | kotasateesh | UNIX for Dummies Questions & Answers | 3 | 07-20-2007 12:25 PM |
| Number comparision in AWK | vskr72 | UNIX for Dummies Questions & Answers | 1 | 11-22-2006 01:35 PM |
| SuSE comparision | lungs | SuSE | 8 | 02-12-2005 01:36 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
while - comparision
Hi,
Please find the attached scriplet and suggest me to fix the bug in this. ----------------------------------- noofdirs=`ls *.tar | wc -l` if [ "$noofdirs" != 0 ] ; then let i=1 while ( $i <= $noofdirs ) ; do echo $i mkdir $i file1=`ls *.tar | head -1` mv $file1 $i i = `expr $i + 1` echo $i done fi ------------------------------------ I want to create the directory according to tar files. If i 3 tar file, it shuold create 3 directories by the name 1,2 and 3. Rgds, Sharif. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|