15 votes

What's wrong with my cronjob syntax, I'm trying to use a backtick (`)?

To resolve the issue escape your % characters. date +%Y-%m-%d should be date +\%Y-\%m-\%d Unfortunately this answer is a little late but the issues is not PATH or backticks - the issue is simply ...
Eric Kigathi's user avatar
7 votes

Puppet string interpolation with function call and a variable as parameter

It wasn't possible, but it is now. The following works using your example: notice("Blah blah ${downcase($::osfamily)} blah blah") This was tested on Puppet 4.10.x, it's documented as far back as 4.6:...
bodgit's user avatar
  • 4,771
6 votes
Accepted

How to set up cron trigger time rule every 5 mins + 2mins delay?

You don't say which version of cron, but on Vixie cron (used in BSD and GNU/Linux) you can specify either of: 2-57/5 * * * * (command) or spell it out 2,7,12,17,22,27,32,37,42,47,52,57 * * * * (...
Cedric Knight's user avatar
5 votes

Full bash script check before runing

You might have a look at the ShellCheck project which performs a more thorough validation of shell script syntax; including best practices and potential pitfalls. However, even ShellCheck won't ...
techraf's user avatar
  • 4,343
5 votes
Accepted

CloudFormation stack yaml syntax?

You have an extra '-' character in the Tags definition. It should look something like the snippet below (I'm not sure of the Join syntax, personally I use Sub normally): Tags: - Key: Name ...
David Hutchison's user avatar
4 votes
Accepted

Ansible -- The offending line appears to be:

The indendation is wrong, tasks should be on the same level as hosts and remote_user. - name: See if location is running on cradlepoint hosts: cradlepoints remote_user: pi tasks: - name: Grab ...
Gerald Schneider's user avatar
2 votes
Accepted

Full bash script check before runing

As @techraf and @Wice22 pointed out, there is no such thing as a complete check at run-time. You could create "unit" tests for your bash script though. One framework which helps with it is BATS: ...
Phillip -Zyan K Lee- Stockmann's user avatar
2 votes
Accepted

TCPDump, can't understand these parts

9801 = TCP starting sequence 11201 = TCP ending sequence (1400) = difference between 9801 and 11201 = data carried in packet
Lenniey's user avatar
  • 5,300
2 votes
Accepted

Postfix sasl_password file and MX resolution

man 5 postconf says following: smtp_sasl_password_maps (default: empty) Optional Postfix SMTP client lookup tables with one username:password entry per sender, remote hostname or next-hop domain. ...
AlexD's user avatar
  • 10.3k
2 votes
Accepted

nftables set of couples { IP/MAC address }

OP's set definition has multiple syntax errors. A set of elements where each element is a combination of two base types, IPv4 + Ethernet, is needed: it's not a set of simple elements, but a set of ...
A.B's user avatar
  • 12.8k
1 vote
Accepted

Trying to understand Cloudformation syntax for UserData script

Referencing another answer here for the formatting of strings in yaml files. Block styles with block chomping indicator (>-, |-, >+, |+) You can control the handling of the final new line in the ...
Petey_Woof's user avatar
1 vote

Removing a machine from domain using PowerShell

As per documentation, the parameter -UnjoinDomainCredential requires a PSCredential object; you can't simply type the credentials in the command line. You can find more info about how to build a ...
Massimo's user avatar
  • 71.3k
1 vote

8: Syntax error: word unexpected (expecting ")")

The correct way is: weekday=$(date +%a) day=$(date +%d) month=$(date +%m) if { [ $month -eq 03 ] || [ $month -eq 10 ]; } && [ $weekday = "So" ] && [ $day -gt 24 ] then ...
Omexlu's user avatar
  • 143
1 vote

8: Syntax error: word unexpected (expecting ")")

weekday=$(date +%a) day=$(date +%d) month=$(date +%m) if [ \( \( $month -eq 03 \) -o \( $month -eq 10 \) \) -a \( "$weekday" = "Sun" \) -a \( $day -gt 24 \) ] then # DO ...
J.M. Robles's user avatar
  • 1,090
1 vote
Accepted

syntax error in monitrc

Missing keyword with not an error, see the documentation You can use noise keywords like 'if', 'and', 'with(in)', 'has', 'us(ing|e)', 'on(ly)', 'then', 'for', 'of' anywhere in an entry to ...
Lenniey's user avatar
  • 5,300
1 vote
Accepted

Ansible Playbook and syntax issue with variables

Yes, it's a simple typo. salt: "{{ lookup('password', '/dev/null length=10' chars=ascii_letters) }}" You can see that the error complained about the literal text chars appearing unexpectedly. ...
Michael Hampton's user avatar
1 vote
Accepted

unbound.conf server option "private-domain" - domain name ending in a dot nor not?

This question is ancient, but it still came up for me as the first entry in a search, so IMO it's worth trying to answer. Bottom line: In this context, and in most others, there is no practical ...
pgroce's user avatar
  • 26
1 vote

Puppet case statements with integer range

Puppet's case statement can evaluate expressions and will run the first associated with the first matching case. It doesn't quite support this: case $mem { 0..1023: { $retvalue = "128M" } ...
GargantuChet's user avatar
1 vote
Accepted

Nginx: significance of bracket syntax?

Syntax one is more useful if you're going to put multiple locations in a configuration, which would be typical. Syntax two is only for when you have a simple server returning a redirect or similar. ...
Tim's user avatar
  • 32.8k
1 vote

Various "Config variables" not defined, Apache 2.4.18

Debian like distros rely on a file called "envvars" in which they put lots of variables. Apache HTTPD compiled from source does include the file but it does not place so many variables there by ...
Daniel Ferradal's user avatar
1 vote

Proper syntax for monitoring an IP in .conf files, Icinga2

Ping4 is not a service I have installed. It was listed as an example on the icinga2 documentation page. The syntax to monitor if a host is alive (and nothing more) in Icinga2 is as follows. object ...
spoon_man's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible