Sponsored Content
Top Forums Shell Programming and Scripting file content in an array PERL Post 302290164 by e_prof on Sunday 22nd of February 2009 05:37:10 AM
Old 02-22-2009
I have to say thank you for the answers!

KevinADC I think it works. I'll try it later because there is not enough time at the moment.

The solution mentioned by sudhir_onweb I tried for myself and the effect was the same I said before.

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formating array file output using perl

Hello, I am trying to output the values in an array to a file. The output needs to be formated such that each array value is left jusified in a field 8 character spaces long. Also, no more than 6 fields on a line. For example: @array= 1..14; Needs to be output to the file like so: 1 ... (4 Replies)
Discussion started by: seismic_willy
4 Replies

2. Shell Programming and Scripting

Perl search and replace file content.

I am not sure if this is doable. I am trying to open and print the content of the file by replacing all instances fo perl to PERL . This is my code but it is giving me the number count instead of the actual lines with changes. open (PERLHISTORY, 'sample.txt') or die "The file sample.txt could... (3 Replies)
Discussion started by: jxh461
3 Replies

3. Shell Programming and Scripting

perl -write values in a file to @array in perl

Hi can anyone suggest me how to write a file containing values,... say 19 20 21 22 .. 40 to an array @array = (19, 20, ... 40) -- Thanks (27 Replies)
Discussion started by: meghana
27 Replies

4. Shell Programming and Scripting

Array in Perl - Detect several file to be in one array

Hi everyone I have one question about using array in perl. let say I have several log file in one folder.. example test1.log test2.log test3.log and the list goes on.. how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
Discussion started by: sayachop
3 Replies

5. Shell Programming and Scripting

Store content from array to Spread_sheet using perl

How to store the content from array to either "row-column" or "column-row" order? (0 Replies)
Discussion started by: kavi.mogu
0 Replies

6. Shell Programming and Scripting

perl extract content of file

I'm using Mail::Internet module, which will basically filter through email content and extract the body of the message my perl script to extract the body of the email #!/usr/bin/perl -w use Mail::Internet; @lines = <STDIN>; $mi_obj = new Mail::Internet(); ... (2 Replies)
Discussion started by: amlife
2 Replies

7. Shell Programming and Scripting

Print @array content to a file

Hi, as the title, I have an array @f_lines with gene information in it. How can I put the content of @f_lines into a file so that I can read it? I tried this: open(OUTPUT, "file"); # put gene information in this file; @f_lines = ("gene1", "gene2", "gene3"...); # gene information; print... (3 Replies)
Discussion started by: lyni2ULF
3 Replies

8. Shell Programming and Scripting

Changing file content in perl

Hi All, I have a file content like this. #<clear_category_list> #<include file="SUITE:Provision-FLEXPONDER_FAC.inc"> #<include file="CAT:SYSTEM:SAS_U23.inc"> #<include file="CAT:PRIORITY:10.inc"> #<include file="CAT:FAC_TYPE:OC48.inc"> #<include file="CAT:FAC_TYPE:OC192.inc">... (2 Replies)
Discussion started by: Syed Imran
2 Replies

9. Shell Programming and Scripting

Perl SCript to read file content (if else statemenet)

Hi All, I wanted to write a perl script to read the content in a file,the file content is either 0 (zero) OR 1. The idea is like this. If (content =1), then it will proceed to perform some step. and then update the file content to 0(zero) else if (content =0), it will update the content to... (11 Replies)
Discussion started by: hploh
11 Replies

10. Shell Programming and Scripting

Ksh: how compare content of a file with an other array

Hi, I created a skript in ksh which generate a file with semicolon as separator, this is an example of the file a created: example content file: hello;AAAA;2014-08-17 hello;BBBB;2014-08-17 hello;CCCC;2014-08-17 I would need to compare the content in of the second column of this file... (3 Replies)
Discussion started by: jmartin
3 Replies
aylet(1)							  Music Software							  aylet(1)

NAME
aylet, xaylet - play Spectrum `.ay' music files SYNOPSIS
aylet/xaylet [-BehlmnNsS] [-A stopafter] [-F fadetime] [-t tracknum] [file1 [file2 ... ]] DESCRIPTION
aylet plays music files in the `.ay' format. These files are essentially wrappers around bits of Z80 code which play music on the Sinclair ZX Spectrum 128's sound hardware - the beeper, or the AY-3-8912 sound chip, or both. Files using the Amstrad CPC ports are also supported. `aylet' has a curses-based interface, and `xaylet' has an X-based one. OPTIONS
-A set stop-after time in seconds (this is the time at which tracks start fading out), or 0 to disable fading. The default is 180 sec- onds (3 minutes). -B use `ABC' stereo positions, rather than the default `ACB'. ACB effectively pushes channels A and B to the left and right (using a stereo delay), with C remaining central; ABC puts A and C to the left/right instead, leaving B central. -e force 8-bit playback, even if 16-bit is available. -F set fade-out time in seconds (the time tracks take to fade out). The default is 10 seconds. -h give terse usage help. -l list the contents of files (track names etc.) rather than playing them. -m use mono rather than the default stereo playback. -n rather than the usual interface, use a simple batch-playing tty style, a bit like mpg123. (Only works in the curses version.) -N use `narrow' stereo separation (so the channels sound closer together) rather than the default `wide' separation. -s output sample data to stdout rather than playing it; implies `-n'. The sample is 44.1kHz 16-bit stereo (or mono if using `-m'). Don't be surprised if the sample takes a little while to generate, as it still has to emulate the Z80. -S apply a pseudo-stereo effect to the beeper output. Works well in some cases, but can make things sound a bit shaky (or rather, more so than usual :-)). -t play only the specified track, then exit. (Strictly speaking, it starts playing the given track, and exits when any track fades out.) Mainly useful when playing a single file non-interactively. file1 etc. the file(s) to play. Currently these can only be specified on the command-line. BEHIND THE SCENES
The way aylet works may seem a little strange if you're not familiar with how the `.ay' format goes about things, so here's some background on how it all works. As mentioned above, the files basically contain chunks of machine code to run on an emulated Z80 with certain sound hardware. Since you're just running a program, you can't really fast-forward or rewind as such, but you can move between tracks specified in the file. (Some files only have one, but others have several.) The whole just-running-a-program thing leads to two other problems, too. You can't tell where a track ends, other than to see when the sound stops; what aylet does is to exit a track after 4 seconds of total silence. And a track may never end at all; aylet fades it out after 3 minutes by default. (Yes, 3 minutes be may too soon to allow some tracks to `finish', but you have to strike the balance somewhere, and it's only a default. Use `-A' or press `s' to change it.) KEYS
Both the curses-based and X-based interfaces use these keys (some of which are based on those used by XMMS): q or Esc exit the program. z previous track. x play. c pause. v stop. b next track. r restart track. Backspace or Delete previous file. Space next file. s increase stop-after time. S decrease stop-after time. Setting it to zero disables fading completely. f increase fade-out time. F decrease fade-out time. h enable/disable high-speed mode, playing four times as fast when enabled (in a way), as a sort of substitute for a real fast-forward control. In xaylet, you can also use the matching buttons for most of the above. When using `aylet -n', the interactivity is scaled down dramatically, leaving just the one control: Ctrl-C if the current track has been playing for less than half a second, exit the program; otherwise, skip to the next track. Note that the key used to do this is really whatever you have set up to generate a SIGINT signal, but it's generally Ctrl-C. EXAMPLES
To play all .ay files in the current directory: aylet *.ay or xaylet *.ay To convert ysfollin.ay to a mono sample in .wav format (requires `sox'): aylet -sm ysfollin.ay |sox -r 44100 -t sw - tune.wav BUGS
The AY is probably too loud relative to the beeper. This may be fixed in the next version, though it's more likely to be an option to choose between the current more reasonable balance and the real thing. :-) Several options which it could reasonably allow to be changed at runtime (e.g. AY stereo, beeper stereo, ACB vs. ABC) can't be at the moment. The X version is currently a bit too much like the curses one, at the expense of GUIness in some respects. SEE ALSO
fuse(1) AUTHOR
Russell Marks (rus@svgalib.org). The Z80 emulation was written by Ian Collier, for xz80. Chris Cox wrote the OpenBSD sound code. Matan Ziv-Av was partly responsible for the OSS sound code. Version 0.4 1st October, 2004 aylet(1)
All times are GMT -4. The time now is 08:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy