Hello,
I am running a script under ubuntu 16.04
I have no problem with the script. My question is general algorithm of for file command.
I just need to know how for file in *.txt process works.
Let's say, I wish to run the script by sorting filename:
or
or another way:
or
In summarize: If we do not indicate any criteria, what's the default working method of for cycle ?
Thank you
Boris
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)
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)
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)
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)
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)
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)
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 SUSE
exicyclog
EXICYCLOG(8) System Manager's Manual EXICYCLOG(8)NAME
exicyclog - Cycle exim's logfiles
SYNOPSIS
eximcyclog
DESCRIPTION
The exicyclog script can be used to cycle (rotate) mainlog and rejectlog files. This is not necessary if only syslog is being used. Some
operating systems have their own standard mechanisms for log cycling, and these can be used instead of exicyclog if preferred.
Each time exicyclog is run the file names get 'shuffled down' by one. If the main log file name is mainlog (the default) then when exicy-
clog is run mainlog becomes mainlog.01, the previous mainlog.01 becomes mainlog.02 and so on, up to a limit which is set in the script, and
which defaults to 10. Reject logs are handled similarly.
If no mainlog file exists, the script does nothing. Files that 'drop off' the end are deleted. All files with numbers greater than 01 are
compressed, using a compression command which is configured by the COMPRESS_COMMAND setting in Local/Makefile. It is usual to run "exicy-
clog" daily from a root "crontab" entry of the form
1 0 * * * su exim -c /usr/exim/bin/exicyclog
assuming you have used the name 'exim' for the Exim user. You can run exicyclog as root if you wish, but there is no need.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO exim(8), /usr/share/doc/exim4-base/
AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system
(but may be used by others).
March 26, 2003 EXICYCLOG(8)