11-13-2019
It's not the
for cycle's feature but the way the shell expands the "glob"s using "pattern matching".
man bash is your friend:
Quote:
Pathname Expansion
After word splitting, unless the -f option has been set, bash scans each word for the characters *, ?, and [. If one of these characters appears, then the word is regarded as a pattern, and replaced with an alphabetically sorted list of filenames matching the pattern.
For any other arrangement of the value list, additional measures must be taken.
This User Gave Thanks to RudiC For This Post:
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I got a cycle in the script which open another scripts.
if
then
action
fi
Scripts action will be running 2 times at the same time.
Inside of action() is insert into the table.
But what I want is that only first script can do insert into table.
So how to do... (2 Replies)
Discussion started by: mape
2 Replies
2. Shell Programming and Scripting
Hello,
I have files in a dir.
I what to create a FOR cycle that will do this
FOR <condition> do
file=`ls <directory> | tail -1`
echo $file
mv -f $file <another dir>
done
What I want to now is what should I put in the <condition>. The condition I want is that the FOR will execute... (3 Replies)
Discussion started by: nagomes
3 Replies
3. HP-UX
Hi! I am new to HP-UX. :o
By using the command glance, I found the user memory usage was very high. I would like to know is there any command can show the process which consume most available memory ? (Just like the command top, but order by memory, not CPU) (1 Reply)
Discussion started by: alfredo
1 Replies
4. Shell Programming and Scripting
hello everybody,
I need help on putting a wildcard match inside an if condition (I'm using korn shell):
if ]
then echo ' '
echo ''$MYSEL' is not a correct option'
echo ' '
else .....
i tried also #if -ne "``" and a lot of combinations of `"' but I didn't find the... (2 Replies)
Discussion started by: elionba82
2 Replies
5. Shell Programming and Scripting
Hello,
I have a question:
is there a way to have a "for" cycle done a certain number of times. For example in c++ I can do this:
for (i=o;i<10;i++)
and the cycle will be repeated 10 times.
in UNIX for example I do this:
for i in `cat /etc/host` do done
and the cycle will be repeated... (6 Replies)
Discussion started by: jcpetela
6 Replies
6. Shell Programming and Scripting
i have a question how to modify below script to generate the expect result below :
test.sh
#!/bin/bash
for ((i=0; i < 25; i++))
do
echo $1$i
done
current result:
test.sh 20090101
200901010
200901011
200901012
200901013
200901014
200901015
200901016
200901017
200901018 (2 Replies)
Discussion started by: bleach8578
2 Replies
7. Shell Programming and Scripting
Hi,
i would like to insert a if-then-else function in to cycle for
--------------
cat test
--------------
# cat test
ALFA
BETA
GAMMA
-----------------------
This is my script:
#!/bin/bash
for i in $(cat test); if ; then
echo "ok"
else (5 Replies)
Discussion started by: elilmal
5 Replies
LEARN ABOUT DEBIAN
sigcensus
SIGCENSUS(1) The Regina Handbook SIGCENSUS(1)
NAME
sigcensus - Form a census of splitting surface signatures
SYNOPSIS
sigcensus order
DESCRIPTION
Forms a census of all splitting surface signatures of the given order. The order is the number of quadrilaterals in the resulting split-
ting surface.
The signatures will be written to standard output, one per line, followed by a count of the total number of signatures found.
Each signature will be output precisely once up to equivalence. Signatures are considered equivalent if they are related by some combina-
tion of:
o relabelling symbols;
o rotating an individual cycle;
o inverting an individual cycle (i.e., reversing the cycle and changing the case of each symbol in the cycle);
o reversing all cycles without changing the case of any symbols.
Upper-case symbols in signatures are not yet supported; this program will only output signatures whose symbols are all lower-case.
For more information on splitting surface signatures, see Burton's PhD thesis at http://www.maths.uq.edu.au/~bab/papers/.
MACOS X USERS
If you downloaded a drag-and-drop app bundle, this utility is shipped inside it. If you dragged Regina to the main Applications folder,
you can run it as /Applications/Regina.app/Contents/MacOS/sigcensus.
WINDOWS USERS
The command-line utilities are installed beneath the Program Files directory; on some machines this directory is called Pro-
gram Files (x86). You can start this utility by running c:Program FilesReginaRegina 4.93insigcensus.exe.
SEE ALSO
tricensus, tricensus-mpi, regina-gui.
AUTHOR
This utility was written by Benjamin Burton <bab@debian.org>. Many people have been involved in the development of Regina; see the users'
handbook for a full list of credits.
28 May 2012 SIGCENSUS(1)