Answer: The answer is.... perhaps more than once ;)
So - when does it run?
Normally * represents all values in the range (for minutes, the range is 00-60).
And the /<number> was how much to skip within this interval.
As such, the syntax says run each minute, starting at 00 and then skip the...
I forgot to use -q with grep, in the curly brackets example :)
Explanation:
'grep -q'
- is a quiet grep and will only tell you if it found the expression or not.
Based on the return code from grep I either cut the 17th or the 16th character out from the output of 'head -1 filename.ext'
----...
x will return either 16 or 17
17 if the 16'th character of the first line in file filename.ext is uppercase (range of A-Z), otherwise it will return 16
head -1 filename.ext |cut -c16 |grep [A-Z] && {
# 16th character is in range A-Z
head -1 filename.ext |cut -c17
} || {
# 16th character...
Just some comments... p5wizard have given a good solution which importantly enough is portable.
Some unices (especially Linux variants) might support syntax that include /<number> where ``/<number>'' specifies skips of the number's value through the range.
# Min Hour DayOfMonth Month...
It depends what you mean about "Remove root password"
If you have problems getting into the server because of a lost root password - and do not have any other ways to gain root access (example via ssh key authentication from a trusted server) aso. you have a more difficult task ahead.
*** Most...
Escaping or quoting is one of the basic methods for handling special characters in unix.
Also note that spaces can be a challenge, and might also impose a risk since a parameter/name can accidentally be mistreated as several individual parameters.
Example: Filename with spaces
-rw-r--r-- 1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.