![]() |
|
|
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 |
| Changing old file name to new one if the old file name satisfied certain condition | balzzz | UNIX for Dummies Questions & Answers | 1 | 02-17-2008 10:41 AM |
| Use awk to create new folder in current directory | ccox85 | Shell Programming and Scripting | 6 | 01-28-2008 03:59 AM |
| print remaining file after a condition is satisfied | hitmansilentass | Shell Programming and Scripting | 5 | 05-07-2007 11:35 AM |
| AIX - create folder in hdisk1 instead | lwy2020 | AIX | 3 | 01-16-2007 04:56 AM |
| Create Folder in Multiple Directories | Stud33 | Shell Programming and Scripting | 15 | 07-20-2006 04:44 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to create folder wen the condition satisfied
hi
i hav files ha1j ha2m ha3n ha4q ha5s ...like tat im having some 20 files ..and i want to create a folder as the same amount of files which im having wen the condition if loop is satisfied .. thank you |
|
||||
|
hi
my program is to sort the files and my files will be like tis engPG1j1.top engPG2h3.top engPG3g5.top engPG4r6.top engPG5y1.top engPG1u3.top engPG2w8.top engPG3e5.top engPG4m3.top etc... And i have to create N folders at run time as many PG1 Files say suppose im having 5 PG1 files ,then i have to create 5 folders and each PG1 files should go into each folder again each PG2 files have to do the same finally it will be (PG1,PG2,PG3,PG4,PG5)in one folder like tat i have to do Thank you |
|
||||
|
i am assuming u hv some files like 20 after 20 files reading u want to create a folder ryt.
#!bin/ksh count=` find $HOME /- maxdepth 1 - name "test_dat*.txt" - print | wc -l if [ $count -gt 0 ] then for $txtfl in $HOME/test_dat*.txt; do echo "copy ur files in $txtfl" cat $txtfl >> $HOME/dnew/dfile.dat done; print "moved sucessfully" fi i hope this will work .. creates a new folder and file |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|