![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Select block of text around matching braces | BootComp | Shell Programming and Scripting | 2 | 03-10-2009 03:29 AM |
| Retrieving random numbers out of a text file | nistleloy | UNIX for Dummies Questions & Answers | 13 | 12-14-2008 04:28 PM |
| Wall, Write, select users, pipe a text file, HELP Before I'm Bald! | chimodel | UNIX Desktop for Dummies Questions & Answers | 1 | 03-13-2008 05:50 PM |
| Select text within matching ( ) bracket | cursive | UNIX for Dummies Questions & Answers | 4 | 04-20-2007 02:14 AM |
| Perl: random select | perleo | Shell Programming and Scripting | 1 | 02-15-2003 09:33 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
random select text file ranamed
i want to need script..
source.txt /home/user1/public_html/test3 /home/user90/public_html/test9 . . . /home/user650/public_html/test000 read source.txt and cd /home/user**/public_html/*** and there is 1.txt, 2txt ~~25.txt and select 6 text files randomly among the 1.txt ,2.txt ~~ 25.txt selected 6 text files be renamed word1.words , word2.words ~~ word6.words in this pattern.. |
|
||||
|
source.txt
/home/user1/public_html/test3 /home/user90/public_html/test9 . . . /home/user650/public_html/test000 there are a lot of directories in source.txt --->maybe 1000 home directories these directories have 1.txt, 2txt ~~25.txt , namely has a text file. i want to randomly select 6 text file among these 25 files. and i also want to rename randomly selected 6 text file as words1.word ~ words6.word . |
|
||||
|
you simply want to pick 6 random lines and change them?
not 6random lines read everyall lines and there is 1.txt 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt ~~ 22.txt 23.txt 24.txt 25.txt file in every directories namely about 25 files exist and i want to randomly select 6 files among 25 files and rename selected 6 text files as words1.word words2.word words3.word words4.word words5.word words6.word . |
| Sponsored Links | ||
|
|