01-28-2016
You need to replace # whatever with some real code. You have never said what you want to do with those one thousand open files and I have no idea what you want to do with those one thousand open files. Replicate the code I provided to once thousand levels instead of five levels and replace the innermost level with code that does whatever you want to do with 1000 open files. Maybe your shell will process it; maybe it won't.
You know exactly how to expand this from five levels to one thousand levels! I'm not going to do it for you. This whole scheme seems like busywork to me.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
Could you please help me to create a shell script that will be started by a cron job once every night at 24.00 h (that should bee easy:))
The shell script should control every 30 seconds the name of a process, and when the process doesn't run anymore it should execute a few further... (12 Replies)
Discussion started by: blackwire
12 Replies
2. Shell Programming and Scripting
Hi all,
I need a script that will loop around all the current processes and take a pmap -x <process id> and output each pmap to a separate file.
Would anyone have a quick command to do this? (2 Replies)
Discussion started by: borderblaster
2 Replies
3. Shell Programming and Scripting
for two txt files, f1 and f2, I like to do the following
grep "abcde" f1 > abcde$f1
grep "xyz" f1 > xyz$f1
can I use a loop to get this done? Thanks
for i in f1 f2
do
grep "abcde" $i > abcde$i
grep "xyz" $i > xyz$i
...
done (11 Replies)
Discussion started by: ksgreen
11 Replies
4. Shell Programming and Scripting
Hi,
I want to create a script who will check if the java process is running & if it finds the process is still there it continues to execute & when the process completes it exit from the script.
I have written a code to check & notify the process existence but i am not getting how to write... (4 Replies)
Discussion started by: d8011
4 Replies
5. UNIX for Dummies Questions & Answers
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
Discussion started by: evelibertine
4 Replies
6. Shell Programming and Scripting
I have the following code running against a file. The file can have upwards of 10000 lines.
problem is, the for loop takes a while to go through all those lines. is there a faster way to go about it?
for line in `grep -P "${MONTH} ${DAY}," file | ${AWK} -F" " '{print $4}' | awk -F":"... (2 Replies)
Discussion started by: SkySmart
2 Replies
7. Shell Programming and Scripting
Hi,
I have a script which triggers an infinite loop.
#!bin/bash
trig=`ls /home/trig.tch |wc -l`
function callj {
some commands...
}
while
do
callj &
done
The number of process after doing a ps -ef |grep Mon.sh returns
processes even after the script is killed by deleting the... (4 Replies)
Discussion started by: chetan.c
4 Replies
8. Shell Programming and Scripting
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have following codecd /tmp/test/
for vfile in `ls -1`
do
for vlink in `ls -l /tmp/testfile/*|bin/grep "local/init\.d/$vfile$"|bin/awk -F"->" '{print($1)}'|bin/awk -F"/" '{print($NF)}'`
I know `ls -1` list only file, but I don't... (3 Replies)
Discussion started by: stew
3 Replies
10. Shell Programming and Scripting
I have a folder with files and I have to process them in a loop. However the filenames have space characters, so the list get split.
$ touch "File Number_1"
$ touch "File Number_2"
$ ls "/tmp/File Number"_*
/tmp/File Number_1 /tmp/File Number_2
I tried following (sorry for using the... (3 Replies)
Discussion started by: Wernfried
3 Replies
CUYO(6) Games Manual CUYO(6)
NAME
cuyo - Tetris-like game with many suprises
SYNOPSIS
cuyo [-d] [-f] [-g widthxheight] [-h] [-?] [--version versions] [ld-file]
cuyo -?
DESCRIPTION
Use A, D, W and S or the arrow keys to move left, move right, turn and drop the falling piece. Try to put blobs of the same color
together. (You don't need to form rows or columns. Any shape will do.) When enough blobs of the same color are connected, they explode.
(What "enough" means depends on the level.) Try to make explosions next to the the grass (or whatever there is in the level instead of the
grass). Then, it will explode, too. The level is finished when no grass is left.
In some levels, you will need a chain reaction to get rid of the grass-equivalent. And many other things may happen in other levels.
In two-player-mode, each time one player causes an explosion, the other one gets grey things (which explode when something else explodes
next to them). If one player builds a too big tower, the other player may get one of his rows.
OPTIONS
-d Debug mode.
-f Fullscreen mode.
-g widthxheight
Set the window size.
-h Print a short help message and exit with status 0.
-? Print a short help message and exit with status 1.
--version versions, --version=versions
Activate special versions of levels and level tracks. versions is a comma-separated list of version specifiers. Version specifiers
pertaining to difficulty setting, numbers of players, and level tracks can also be set from the main menu. See the cual(6) manpage
for the relevant values. The other version specifiers which are actually used in levels are eco and geek.
eco makes a very few levels less resource-hungry. In the consequence, they also become less beautiful.
If you're trying to design own levels, you can pass the name of your .ld file (level description file) to test the level. If you do that,
this will be the only available level.
CREATING NEW LEVELS
The main work is to draw all those little icons. Then you have to create a level description file which tells cuyo how to put everything
together. There is an example level with many comments. Its description file is example.ld. (It should be part of the cuyo distribution
and probably lies in the same directory as the other cuyo level description files.) It is rather outdated but may still be a good starting
point.
Other Sources of information are:
- Try man cual. Cual - the Cuyo Animation Language - is the format of level description files.
- And of course, there are the level description files of the existing levels (files ending in .ld, probably located somewhere like
/usr/share/games/cuyo/).
SEE ALSO
cual(6)
BUGS
The level description language is still under development.
In the preferences dialog, some keys are not displayed correctly.
The AI Player is not very intelligent. In particular, it doesn't understand most of the special features of the levels, and so, it some-
times behaves very silly.
See the TODO file for other bugs.
AUTHORS
Mainly Immanuel Halupczok <cuyo@karimmi.de>.
Other contributors to the source code: Bernhard R. Link, Mark Weyer, Bernhard Seckinger.
Other contributors of levels: Daniela Lipps, Simon Huggenberger.
2012-1-27 CUYO(6)