The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Dynamically ftp'ing a file pyaranoid UNIX for Advanced & Expert Users 0 09-02-2007 07:34 AM
How to write current Date dynamically in a file Sree_2503 Shell Programming and Scripting 5 10-17-2006 05:19 PM
copy files dynamically from within a file chiru_h Shell Programming and Scripting 1 08-21-2006 06:24 PM
dynamically linked file sveera UNIX for Advanced & Expert Users 5 06-03-2005 02:52 PM
dynamically linked file sveera Shell Programming and Scripting 1 05-06-2005 02:40 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-03-2004
stareja stareja is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 8
Need to dynamically create a file

I'm trying to write a script that generates a file of varying size filled with random text and am having some difficulties.

The major problems are that I'm limited to csh and a lot of the systems I have to run this on don't have a /dev/random (so a wrapper around the dd if=/dev/random or dd if=/dev/zero commands won't work).

This script is going to be run on varying UNIX operating systems and, as I've said, the lowest common denominator is csh. I'd like to make this as cross-platform as possible.

Anyone have any recommendations?
  #2 (permalink)  
Old 12-03-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
Could you provide a bit more information? Such as a use for such a script.
  #3 (permalink)  
Old 12-03-2004
stareja stareja is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 8
Quote:
Originally posted by seg
Could you provide a bit more information? Such as a use for such a script.
Sure. I'm going to use it to generate a file to ftp to/from multiple systems for network benchmarking.

I already have all the ftp parts automated, I just can't figure out how to generate the file dynamically before ftp kicks in (I don't actually want to keep the files, they just need to be around for the ftp's).

Being limited to csh and not having /dev/random hurts a bit.
  #4 (permalink)  
Old 12-03-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
Sorry bro, sound's too fishy to me. I don't see a need to create such files dynamically for 'benchmarking'. If I'm wrong then I wish you luck.
  #5 (permalink)  
Old 12-03-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,115
cat /bin/* | dd

or something like that.
  #6 (permalink)  
Old 12-03-2004
stareja stareja is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 8
Quote:
Originally posted by seg
Sorry bro, sound's too fishy to me. I don't see a need to create such files dynamically for 'benchmarking'. If I'm wrong then I wish you luck.
I'm not sure what you mean by 'fishy' but just because *you* don't see a need for it doesn't mean it isn't legitimate. I really don't want to leave 100-300MB files laying around for when my management gets a wild hair to see how our network connections are doing.

In the future, a simple "I don't know" would suffice instead of calling into question my purpose.

Someone else wish to give me a hand?
  #7 (permalink)  
Old 12-03-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
Quote:
If I'm wrong then I wish you luck.
No need to get bent out of shape.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0