Questions tagged [syntax]

65 questions
59
votes
2 answers

Should I use semicolons at the end of each PowerShell statement?

I've done a fair bit of programming in C#, but then I've also written a lot of T-SQL scripts. C# requires semicolons, and T-SQL and PowerShell they're optional. What do you do for PowerShell? Why? My gut feel is to include semicolons but I don't…
Mark Allison
  • 2,188
  • 7
  • 26
  • 45
43
votes
4 answers

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

Here's what I'd like to automate: 00 08 * * * psql -Uuser database < query.sql | mail somone@null.com -s "query for `date +%Y-%m-%dZ%I:%M`" Here's the error message: /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c:…
Terry G Lorber
  • 667
  • 2
  • 9
  • 14
11
votes
2 answers

How to interpret the bash command "usage" syntax?

How exactly do you have to interpret the output of a commands "usage" output, in bash for example. For example, on my OS X, cp gives me usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi |…
raoulsson
  • 4,763
  • 10
  • 34
  • 29
10
votes
2 answers

BIND/DNS Zone meaning of "IN"

I have been reading http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-bind-zone.html but the document raised a question. What is the meaning of IN? Is it just a class which is optional or does it mean more than that? (Yes I read that in…
elhombre
  • 435
  • 1
  • 8
  • 18
8
votes
5 answers

How can I perform a syntax check on an .htaccess file in a shared hosting environment?

I have a build script (Perl) that modifies the .htaccess file when I deploy my applications. As a double-check, I'd like to be able to perform some sort of syntax checking on the created .htaccess file. I am familiar with the idea of using apachectl…
Danny
  • 311
  • 1
  • 4
  • 10
5
votes
1 answer

Poweshell escaped wildcard

I'm trying to compare string which contains wildcard character. ("www.mysite.*" -match '`*') But something is not working because I always get a True response, for example ("www.mysite.com" -match '`*') I've tried using -contains instead, but…
Miquel Àngel
  • 75
  • 1
  • 4
4
votes
1 answer

Is There a Difference in Methods of Command Execution in a Subshell?

I wonder if there is a significant difference of calling sub shell via $(...) or `...`? For example: a=$(ls -la /tmp | grep vox-*) And: a=`ls -la /tmp | grep vox-*` The result will be the completely the same, but I want to know why there are two…
4
votes
1 answer

Ansible -- The offending line appears to be:

I'm trying to implement a playbook to grab the external IP address at a few locations but it keeps giving me this same error: The offending line appears to be: remote_user: pi tasks: ^ here I've messed around with the indentation a…
Brian Lamb
  • 59
  • 1
  • 4
3
votes
4 answers

How to fix Puppet fully-qualified parameter path error?

I regularly but randomly get the following error message when I run the puppet client on machines (non-daemonized): err: Could not create : Parameter path failed: File paths must be fully qualified warning: Not using cache on failed…
David Gardner
  • 1,509
  • 2
  • 13
  • 25
3
votes
3 answers

Debian network bridge configuration - /etc/network/interfaces

I'm running a Lenny Xen dom0 hosting multiple virtual machines in a routed IP setup. To get an additional private subnet, I created the bridge xenbr0 in the dom0 with the following commands: brctl addbr xenbr0 ifconfig xenbr0 10.0.0.1 netmask…
maff
  • 311
  • 1
  • 4
  • 14
2
votes
1 answer

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

unbound.conf is used to configure Unbound, a caching DNS resolver. The documentation of version 1.6.8 says: Server Options private-domain: Allow this domain, and all its subdomains to contain private addresses. Give…
Fabian
  • 397
  • 3
  • 17
2
votes
1 answer

Various "Config variables" not defined, Apache 2.4.18

I have been setting up a blog/cloud server on Ubuntu 16.04 with Apache 2.4.18 and after rebooting my machine, came across this error. [Wed Aug 03 01:04:41.468928 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOCK_DIR} is not…
alexrocksdude
  • 21
  • 1
  • 3
2
votes
1 answer

mail: Cannot parse address

This is the command I use to tar my backup files, write to stdout and then upload everything to Amazon S3 with an email notification. tar -czvf - --exclude-caches /var/www | s3cmd --reduced-redundancy --multipart-chunk-size-mb=30 put -…
MultiformeIngegno
  • 1,687
  • 9
  • 26
  • 31
2
votes
1 answer

Postfix header_checks syntax (POSIX - Perl)

I am using header_checks in Postfix to rewrite my headers (for emails sent by Outlook through my server). Here is the part of the header I am trying to change : Received: from Raphasus (****.abo.wanadoo.fr [***.***.***.109]) by mail.********.com…
Raphael Laurent
  • 219
  • 1
  • 6
  • 17
2
votes
5 answers

debian bash/sh string execution

I am stuck with this piece of code here user@server:~$ TEST="ssh rsync@otherserver.example.org 'date; hostname -A; uname -a'" user@server:~$ $TEST bash: date; hostname -A; uname -a: Command not found. I want to use this inside a shell script an…
Daywalker
  • 495
  • 5
  • 25
1
2 3 4 5