Sponsored Content
Top Forums Shell Programming and Scripting How to run this program with only one input file at a time Post 302275425 by Prat007 on Saturday 10th of January 2009 12:13:36 PM
Old 01-10-2009
Question How to run this program with only one input file at a time

i have a program ABC, which runs every two minutes and takes the input according to the a value called "pointer"

files need to be processed by ABC are

input0001
input0002
input0003
input0004
input0005

current value of pointer is 0001, now program runs and takes all the files from input0001 onwards and processes all till input0005.

i want to process only one file in each run of this program, instead of all in single run.

i have only the right to rename the input files and process them one by one. if i'll make input0002 to input0002.stop , program will stop, but how to resume it back, and rename all files one by one. i cant make any change in the program. plz help
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Run a program for every file with a given extension

Hey all I have written a python program that takes as input the name of a data file with the extension .lc I would like to write a shell script that finds all of the .lc files in a set of branching directories and runs the program. Any help? (5 Replies)
Discussion started by: Phobos33
5 Replies

2. Shell Programming and Scripting

File path with space as external input to the program

Hello I am getting error when the file (Folder or Application) path having space is given as external input to the shell program. It works fine for the files which has no spaces in the file name Thans, (5 Replies)
Discussion started by: keshav.murthy@r
5 Replies

3. UNIX for Dummies Questions & Answers

(Beginner) Run c++ .exe with input to file

Hi, I've got this requirement for my homework assignment, but I'm not sure how to meet it: In the comamnd line, I need to type $ <exec-file> <input> <output_file_name> Like: test 1+2 out.txt Which should execute test.exe passing in 1+2 and directing output to out.txt. I know how... (1 Reply)
Discussion started by: JustinT
1 Replies

4. Shell Programming and Scripting

Can process substitution be used as an input file to another program?

Hey, I was trying to figure out how to launch a program from the command line, and it works if you pass it a config file. I was thinking about writing a script to dynamically create the config file and pass it to the command using something like command substitution (so I don't actually have to... (3 Replies)
Discussion started by: bj0
3 Replies

5. Shell Programming and Scripting

Shell script to run a python program on multiple entries in a file

Hello I am trying to run a python program using shell script, which takes a single argument from a file. This file has one entry per line : 1aaa 2bbb 3ccc 4ddd 5eee ... ... ... My shell script runs the program, only for the last entry : #!/bin/sh IFS=$'\n' for line in $(cat... (2 Replies)
Discussion started by: ad23
2 Replies

6. Shell Programming and Scripting

Help to write a script or program to automatic execute and link input file data

Output file template format <input_file_name>a</input_file_name> <total_length_size>b</total_length_size> <log_10_length_size>c</log_10_length_size> Input_file_1 (eg. sample.txt) SDFSDGDGSFGRTREREYWW Parameter: a is equal to the input file name b is equal to the total length of... (2 Replies)
Discussion started by: perl_beginner
2 Replies

7. Shell Programming and Scripting

Need help to run sql query from a script..which takes input from a file

I need to run sql script from shell script which takes the input from a file and contents of file will be like : 12345 34567 78657 and query will be like : select seq_nbr from bus_event where event_nbr='12345'; select seq_nbr from bus_event where event_nbr='34567'; select seq_nbr... (1 Reply)
Discussion started by: rkrish
1 Replies

8. Shell Programming and Scripting

How to give a text file as input while running a program?

Hi Friends, I am running a program /path/to/program -i 1 100 -o /path/to/output/op_1_100.txt In the above command, I have to try various number of combinations at the -i parameter and the output file name varies with each combination. Now, I have my -i parameter text file, which is like... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

9. Shell Programming and Scripting

Run a program-print parameters to output file-replace op file contents with max 4th col

Hi Friends, This is the only solution to my task. So, any help is highly appreciated. I have a file cat input1.bed chr1 100 200 abc chr1 120 300 def chr1 145 226 ghi chr2 567 600 unix Now, I have another file by name input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies

10. Shell Programming and Scripting

How to take the file name in run time using shell.?

I want to take the file name as an input to the program and copy that file into new location using shell. Below program is not working properly. #!/bin/sh if ; then `/usr/bin/perl -pi -e's/(notifications_enabled\s*)(\d+)/$sub = "$1" . ("$2"== "0" ? "1":"0")/e; ' $file` `cp... (2 Replies)
Discussion started by: praveen265
2 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 03:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy