08-11-2010
Creating 1000 files using a script
I would like to write a script that would create 1000 files like clm0001.txt to clm1000.txt. All the files would contain the same contents. How do I achieve this using a script?Please help.
10 More Discussions You Might Find Interesting
1. Solaris
I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)
Discussion started by: valicon
3 Replies
2. Shell Programming and Scripting
this is the output i am getting here..
cp: cannot create /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/eoigwsA_Health_Status_Report.html: Permission denied
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/GenerateReport.sh:... (6 Replies)
Discussion started by: surekha268
6 Replies
3. Shell Programming and Scripting
Hi All,
I want to create a shell script which dynamically create text files. i am using the following script
$i=1
while
do
cat > test_$i.txt
done
but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies
4. Shell Programming and Scripting
Hi i have a folder with 27,000 images. I need to process each image using imagemagick. I have got image magick working. I don't want to attempt to process all 27,000 images in one go and thought i would try doing it with 1000 images at a time. Is there some way i can list only the first 1000... (7 Replies)
Discussion started by: timgolding
7 Replies
5. Shell Programming and Scripting
Hi Greetings
i have 1000 files (xmlfiles) and i need to find which file contain the string over 1000 file
all file end with txt
i tried with
grep -c "string" *.txt
i am getting an error
-bash: /bin/egrep: Argument list too long
i have put an script like below
#!/bin/bash
for line... (9 Replies)
Discussion started by: venikathir
9 Replies
6. Shell Programming and Scripting
I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies
7. Shell Programming and Scripting
Please forgive my ignorance on scripting. I am trying to determine (via a script) if a certain string of characters is present . The string that I am looking for is a constant length.
Here is the string I am searching for:
Model_Type={t}, ModelName={m}
I need to determine if the above... (2 Replies)
Discussion started by: dlundwall
2 Replies
8. Shell Programming and Scripting
Hi,
I am creating a shell script which will check the processing of the main script if the error count is more than 2% of the record count in a feed. Part of the code is below:
err_tol=`echo $feed_cnt \* 0.02 |bc`
while read line
do
err_cnt=$(grep -i "$line" $err_log | wc -l)
... (5 Replies)
Discussion started by: member2014
5 Replies
9. UNIX for Advanced & Expert Users
Hi
I am new to Linux / scripting language. I need to improve our Linux servers at work and looking to claim some space my deleting log files/ folders on a 5 day basis.
Can someone help me with creating a script to do so.
Any sample script will be helpful.:b:
Regards (2 Replies)
Discussion started by: sachinksl
2 Replies
10. Shell Programming and Scripting
Hi, I try to explain my problem , I have a file like this:
aasdsaffsc23
scdsfsddvf46567
mionome0001.pdb
asdsdvcxvds
dsfdvcvc2324w
What I need to do is to create 1000 files in which myname line listing a sequence of numbers from 0001 to 1000. So I want to have :
nomefile0001.txt that must... (10 Replies)
Discussion started by: danyz84
10 Replies
LEARN ABOUT DEBIAN
mojomojo::formatter::file
MojoMojo::Formatter::File(3pm) User Contributed Perl Documentation MojoMojo::Formatter::File(3pm)
NAME
MojoMojo::Formatter::File - format file as XHTML
DESCRIPTION
This formatter will format the file argument as XHTML.
Usage: {{file TYPE filename}}
{{file Text uploads/Files/test.txt}}
TYPE is a plugin present in Formatter/File/ directory.
Currently there are only three: Pod, DocBook and Text
The plugin TYPE format only the file which the extension match with 'can_format' method. Respectively pod, xml and txt for existing
plugins.
For security reasons the path of file must be include in 'whitelisting' directory. You can use path_to(DIR) to describe directory in
mojomojo.conf:
Just an example to view the test pod file t/var/files/test.pod :
Add this to mojomojo.conf :
<Formatter::Dir>
prefix_url /myfiles
whitelisting __path_to(t/var/files)__ </Formatter::Dir>
To see the pod content formatted in xhtml, write in the text area:
{{file Pod path_to(t/var/files)test.pod}}
To show recursively all files of directory see script/util/dir2mojomojo.pl script. To test it:
# start mojomojo
./script/mojomojo_server.pl
# run dir2mojomojo script
./script/util/dir2mojomojo.pl --dir=~/dev/mojomojo/t/var/files/ --url=/myfiles
Connect to http://server:3000/myfiles/
METHODS
format_content_order
Format order can be 1-99. The File formatter runs on 92.
format_content
Calls the formatter. Takes a ref to the content as well as the context object.
plugin
Return the plugin to use with file attachment
format
Return the content formatted
checkplugin
Return 0 if plugin exist
checkfile
Directory must be include in whitelisting
SEE ALSO
MojoMojo,Module::Pluggable::Ordered
AUTHORS
Daniel Brosseau <dab@catapulse.org>
LICENSE
This module is licensed under the same terms as Perl itself.
perl v5.14.2 2010-04-07 MojoMojo::Formatter::File(3pm)