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
QWheelEvent(3qt)														  QWheelEvent(3qt)

NAME
QWheelEvent - Parameters that describe a wheel event SYNOPSIS
#include <qevent.h> Inherits QEvent. Public Members QWheelEvent ( const QPoint & pos, int delta, int state, Orientation orient = Vertical ) QWheelEvent ( const QPoint & pos, const QPoint & globalPos, int delta, int state, Orientation orient = Vertical ) int delta () const const QPoint & pos () const const QPoint & globalPos () const int x () const int y () const int globalX () const int globalY () const ButtonState state () const Orientation orientation () const bool isAccepted () const void accept () void ignore () DESCRIPTION
The QWheelEvent class contains parameters that describe a wheel event. Wheel events are sent to the widget under the mouse, and if that widget does not handle the event they are sent to the focus widget. The rotation distance is provided by delta(). The functions pos() and globalPos() return the mouse pointer location at the time of the event. A wheel event contains a special accept flag that indicates whether the receiver wants the event. You should call QWheelEvent::accept() if you handle the wheel event; otherwise it will be sent to the parent widget. The QWidget::setEnable() function can be used to enable or disable mouse and keyboard events for a widget. The event handler QWidget::wheelEvent() receives wheel events. See also QMouseEvent, QWidget::grabMouse(), and Event Classes. MEMBER FUNCTION DOCUMENTATION
QWheelEvent::QWheelEvent ( const QPoint & pos, int delta, int state, Orientation orient = Vertical ) Constructs a wheel event object. The globalPos() is initialized to QCursor::pos(), i.e. pos, which is usually (but not always) right. Use the other constructor if you need to specify the global position explicitly. delta contains the rotation distance, state holds the keyboard modifier flags at the time of the event and orient holds the wheel's orientation. See also pos(), delta(), and state(). QWheelEvent::QWheelEvent ( const QPoint & pos, const QPoint & globalPos, int delta, int state, Orientation orient = Vertical ) Constructs a wheel event object. The position when the event occurred is given in pos and globalPos. delta contains the rotation distance, state holds the keyboard modifier flags at the time of the event and orient holds the wheel's orientation. See also pos(), globalPos(), delta(), and state(). void QWheelEvent::accept () Sets the accept flag of the wheel event object. Setting the accept parameter indicates that the receiver of the event wants the wheel event. Unwanted wheel events are sent to the parent widget. The accept flag is set by default. See also ignore(). int QWheelEvent::delta () const Returns the distance that the wheel is rotated expressed in multiples or divisions of the wheel delta, which is currently defined to be 120. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user. The wheel delta constant was defined to be 120 by wheel mouse vendors to allow building finer-resolution wheels in the future, including perhaps a freely rotating wheel with no notches. The expectation is that such a device would send more messages per rotation but with a smaller value in each message. const QPoint &; QWheelEvent::globalPos () const Returns the global position of the mouse pointer at the time of the event. This is important on asynchronous window systems such as X11; whenever you move your widgets around in response to mouse events, globalPos() can differ a lot from the current pointer position QCursor::pos(). See also globalX() and globalY(). int QWheelEvent::globalX () const Returns the global x-position of the mouse pointer at the time of the event. See also globalY() and globalPos(). int QWheelEvent::globalY () const Returns the global y-position of the mouse pointer at the time of the event. See also globalX() and globalPos(). void QWheelEvent::ignore () Clears the accept flag parameter of the wheel event object. Clearing the accept parameter indicates that the event receiver does not want the wheel event. Unwanted wheel events are sent to the parent widget. The accept flag is set by default. See also accept(). bool QWheelEvent::isAccepted () const Returns TRUE if the receiver of the event handles the wheel event; otherwise returns FALSE. Orientation QWheelEvent::orientation () const Returns the wheel's orientation. const QPoint &; QWheelEvent::pos () const Returns the position of the mouse pointer, relative to the widget that received the event. If you move your widgets around in response to mouse events, use globalPos() instead of this function. See also x(), y(), and globalPos(). ButtonState QWheelEvent::state () const Returns the keyboard modifier flags of the event. The returned value is ShiftButton, ControlButton, and AltButton OR'ed together. int QWheelEvent::x () const Returns the x-position of the mouse pointer, relative to the widget that received the event. See also y() and pos(). int QWheelEvent::y () const Returns the y-position of the mouse pointer, relative to the widget that received the event. See also x() and pos(). SEE ALSO
http://doc.trolltech.com/qwheelevent.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qwheelevent.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QWheelEvent(3qt)
All times are GMT -4. The time now is 10:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy