Sponsored Content
Top Forums Shell Programming and Scripting Generate 10000 unique audio file of 2MB each using shell script. Post 302956069 by wisecracker on Friday 25th of September 2015 01:41:05 PM
Old 09-25-2015
Here you go two 2MiB raw 8 bit files inside the /tmp/ directory...
Longhand OSX 10.7.5, default bash terminal...
Code:
Last login: Fri Sep 25 18:13:54 on ttys000
AMIGA:barrywalker~> n=1
AMIGA:barrywalker~> dd if=/dev/urandom of=/tmp/audio$n.raw bs=65536 count=32
32+0 records in
32+0 records out
2097152 bytes transferred in 0.139460 secs (15037650 bytes/sec)
AMIGA:barrywalker~> ls -l /tmp/
total 4096
-rw-r--r--  1 barrywalker  wheel  2097152 25 Sep 18:19 audio1.raw
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-3cbyC8
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-AW6HFF
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-tIudW3
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-vbq4iY
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launchd-115.cw4TfC
drwx------  3 _spotlight   wheel      102 25 Sep 18:14 launchd-204.CisNkR
AMIGA:barrywalker~> n=2
AMIGA:barrywalker~> dd if=/dev/urandom of=/tmp/audio$n.raw bs=65536 count=32
32+0 records in
32+0 records out
2097152 bytes transferred in 0.137951 secs (15202137 bytes/sec)
AMIGA:barrywalker~> ls -l /tmp/
total 8192
-rw-r--r--  1 barrywalker  wheel  2097152 25 Sep 18:19 audio1.raw
-rw-r--r--  1 barrywalker  wheel  2097152 25 Sep 18:23 audio2.raw
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-3cbyC8
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-AW6HFF
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-tIudW3
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launch-vbq4iY
drwx------  3 barrywalker  wheel      102 25 Sep 17:59 launchd-115.cw4TfC
drwx------  3 _spotlight   wheel      102 25 Sep 18:14 launchd-204.CisNkR
AMIGA:barrywalker~> _

I have no idea what kind of disk thrashing would occur with 20GiB worth of junk data being written to it, nor how long it would take, HOWEVER......
You use this method at your own risk and myself this site hold no responsibility for any adverse effects using this method...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need to generate unique id from constant sid

Hello I have multiple accounts that running application that uses unique port number I want to generate this port from some sid number that stays constant for every user account , is there any place in the system that generate number that is unique to the account ? thanks (0 Replies)
Discussion started by: umen
0 Replies

2. Shell Programming and Scripting

Urgent: selecting unique specific content of a file using shell script

Hi, I have a file whose content and format at places is as given below. print coloumn .... coloumn .... coloumn .... skip 1 line print coloumn ... skip 1 line I need to select the following : print coloumn .... coloumn .... coloumn... (2 Replies)
Discussion started by: jisha
2 Replies

3. Shell Programming and Scripting

How to generate 10.000 unique numbers?

hello, does anybody can give me a hint on how to generate a lot of numbers which are not identically via scripting etc? (7 Replies)
Discussion started by: xrays
7 Replies

4. Shell Programming and Scripting

Create shell script to extract unique information from one file to a new file.

Hi to all, I got this content/pattern from file http.log.20110808.gz mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1 mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies

5. Shell Programming and Scripting

a shell script to generate an excel sheet from a text file..

hi, i have a text file that looks like this! i want to generate an excel sheet out of it, removing all the junk data except the addresses that look like . Arrow Electrical Services Rotating Machinery, Electrical Contracting & Mining Specialists Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies

6. Linux

Shell Script to generate Dynamic Param file Using SQL Plus Quey

Hi All, Can anyone give me Shell script sample script to generate Param file by Reading Values from SQL Plus query and it should assign those values to variables like.. $$SChema_Name='ORCL' Thanks in Advance... Srav... (4 Replies)
Discussion started by: Sravana Kumar
4 Replies

7. Shell Programming and Scripting

Generate unique mac address

Hi, I want to generate 2000 mac address. Please let me know how to do so. Perl script or there is some tool availlable wherein i can give the count and it will generate that many mac-address Thanks, Kriti (4 Replies)
Discussion started by: kriti
4 Replies

8. Shell Programming and Scripting

Shell script to compare and generate a new file

Requirement is I have two files their format is File1 - input_file ----- tmp_value|3|number|| tmp_value1|3|alpha|| tmp_value2|6|alpha|AA AA| tmp_value3|15|number|000000005| tmp_value4|15|number|000000000000000| tmp_value5|11|alpha|bbbbbbbbbbb| tmp_value6|11|alpha|bb bb| input_file ... (4 Replies)
Discussion started by: greenworld123
4 Replies

9. Shell Programming and Scripting

Parameterizing to dynamically generate the extract file from Oracle table using Shell Script

I have below 2 requirements for parameterize the generate the extract file from Oracle table using Shell Script. Could you please help me by modifying the script and show me how to execute it. First Requirement: I have a requirement where I need to parameterize to generate one... (0 Replies)
Discussion started by: hareshvikram
0 Replies

10. UNIX for Beginners Questions & Answers

Shell script newbie- how to generate service log from shell script

Hi, I am totally a newbie to any programming languages and I just started an entry level job in an IT company. One of my recent tasks is to create a script that is able to show the log file of linux service (i.e. ntpd service) lets say, if I run my script ./test.sh, the output should be... (3 Replies)
Discussion started by: xiaogeji
3 Replies
DBIAgent::Queue(3pm)					User Contributed Perl Documentation				      DBIAgent::Queue(3pm)

NAME
POE::Component::DBIAgent::Queue -- Helper class for managing a round-robin queue of Po:Co:DBIAgent:Helper's. SYNOPSIS
DESCRIPTION
Methods This are the methods we recognize: init init the queue (currently noop) add append argument to the queue clear Clear the queue find_by_pid Find the index of helper with specified pid find_by_wheelid Find the index of helper with specified wheel id remove_by_pid Remove helper with specified pid remove_by_wheelid Remove helper with specified wheel id next Get next helper off the head of the queue (and put it back on the end (round robin)) make_next Force the helper with the specified wheel id to the head of the queue. exit_all Tell all our helpers to exit gracefully. kill_all Send the specified signal (default SIGTERM) to all helper processes AUTHOR
This module has been fine-tuned and packaged by Rob Bloodgood <robb@empire2.com>. However, most of the code came directly from Fletch <fletch@phydeaux.org> and adapted for the release of POE::Component::DBIAgent. Thank you, Fletch! However, I own all of the bugs. This module is free software; you may redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-01-18 DBIAgent::Queue(3pm)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy