Questions tagged [syntax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
299 views

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: ^ ...
user avatar
2 votes
1 answer
268 views

Postfix sasl_password file and MX resolution

Thanks to @AlexD idea, we'll implement the following transport table in order to simulate a IP failover using the DNS MX resolution (postfix 3.3) Relay for 2 domains, exemple[12].com exemple1.com ...
user avatar
  • 5,378
1 vote
1 answer
892 views

Removing a machine from domain using PowerShell

I was tasked to develop a PS script to remove machines from the domain for automation purposes. I am not a full time scripter so i went ahead and did some digging and found this : "Remove-...
user avatar
0 votes
1 answer
62 views

Strongswan swanctl.conf parameter syntax

I am looking for exact syntax for swanctl.conf parameter syntax. I read though the swanctl.conf documentation, but there does not seem to be any exact syntax for parameters. Mainly I am looking for ...
user avatar
  • 161
1 vote
2 answers
3k views

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

The following code: weekday=$(date +%a) day=$(date +%d) month=$(date +%m) if [[ ( $month == 03 || $month == 10 ) && $weekday = "Sun" && $day > 24 ]] then # ...
user avatar
  • 43
0 votes
1 answer
3k views

syntax error in monitrc

I must be doing stupid in my monitrc file but can't find it. If anyone wants to take a look, here is the result of monit -t root@app-server[192.168.100.83] ~ # monit -t /etc/monit/monitrc:308: syntax ...
user avatar
  • 252
0 votes
1 answer
47 views

TCPDump, can't understand these parts

I need help to understand the bold part of this line : 01:04:28.539138 IP 90.2.255.58.37727 > 71.197.145.153.46872: . 9801:11201(1400) ack 0 win 2003 9801:11201(1400) 9801 seems to be the data ...
user avatar
0 votes
1 answer
8k views

Ansible Playbook and syntax issue with variables

I'm trying to execute the below playbook I wrote but it fails on some syntax errors. I tried few things from the online doc but without sucess so far. The aim of these variable is to generate a ...
user avatar
  • 15
1 vote
1 answer
684 views

Editing a value in a ldap dn

What is the correct syntax to edit a value in an LDAP dn? As of now I was trying the following: serveradmin@magic:~$ ldapmodify -x -W -D cn=admin,dc=example,dc=com <<EOF > dn: uid=foo,ou=...
user avatar
0 votes
0 answers
5k views

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: <domain name> Allow this domain, and all ...
user avatar
  • 326
1 vote
1 answer
3k views

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

In Microsoft Azure, this runs the script every 5 mins: "0 */5 * * * *" I thought i will run another script every 5 mins plus 2 mins with rule: "0 */7 * * * *" but then i realized i made a mistake (0,...
user avatar
  • 189
0 votes
1 answer
374 views

DNS zone file syntax check through SVN

I have server in development environment, we manage our DNS files through svn repositories. Few days ago, We messed up our DNS server by committing zone file with invalid serial number. So I want to ...
user avatar
  • 67
1 vote
1 answer
3k views

CloudFormation stack yaml syntax?

I'm trying to create a SecurityGroup which has a tag like Name: SG-StackName. This code works perfect in json: "Resources": { "SecurityGroup": { "Type": "AWS::EC2::SecurityGroup", ...
user avatar
  • 2,075
0 votes
3 answers
339 views

Full bash script check before runing

Trying to implement self syntax checking in bash script test.sh to run syntax check before script will be executed. error_exit() { echo -e "$1" 1>&2 exit 1 } bash -n "$(...
user avatar
  • 127
1 vote
1 answer
399 views

Nginx: significance of bracket syntax?

Using Nginx on FreeBSD, wondering what's the difference between events { worker_connections 200; } and just worker_connections 200; by itself? Or server { listen 80; location / { ...
user avatar
  • 169
2 votes
1 answer
4k views

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: ...
user avatar
-1 votes
1 answer
96 views

SyntaxError at phyton script [closed]

I try to run an python script but I get errors. File "./ics2owncloud.py", line 41 r = requests.put('%s/%s.ics' % (base_url, uid) verify=False), SyntaxError: invalid syntax How must i add the verify=...
user avatar
  • 3
-1 votes
1 answer
225 views

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

I currently have the code object Host "rqbhost" { address = "xx.xx.xx.xx" check_command = "hostalive" } object Service "ping4" { host_name = "rqbhost" check_command = "ping4" } object Service "...
user avatar
1 vote
1 answer
142 views

openldap alternative to modifying core schema syntax

I have an application that stores contacts in OpenLDAP. It uses the c attribute to store a string describing a country name. The syntax of c only allows a two-letter country code, but the application ...
user avatar
  • 1,690
4 votes
1 answer
47 views

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 ...
user avatar
1 vote
0 answers
2k views

rsyslog filter on authpriv facility in rsyslog.conf

This has been addressed in other post(s), but I still can't get this to work properly. I am trying to OMIT (discard) certain entries from being written to my " /var/log/secure ". Namely, any line ...
user avatar
1 vote
3 answers
6k views

Puppet string interpolation with function call and a variable as parameter

Trying to construct a string. I can do: "Blah blah ${::osfamily} blah blah" "Blah blah ${$::osfamily} blah blah" But whats the syntax to call a function with a variable as parameter and have ...
user avatar
  • 294
1 vote
1 answer
213 views

Fixing syntax errors in lighttpd.conf?

lighttpd newbie here... We're trying to set up lighttpd to host a local django app, kiosk-style. We intend to use wsgi for this, but we're having trouble figuring out the syntax for lighttpd's config ...
user avatar
1 vote
2 answers
4k views

Puppet Error: 400 on SERVER: Syntax error at

I am getting a syntax error when running puppet, although I cant figure out why: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at 'String'; expected ')' at /...
user avatar
5 votes
1 answer
9k views

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" -...
user avatar
1 vote
2 answers
631 views

Puppet case statements with integer range

I need to write a case using some ranges in order to write in a better way something like the following spaghetti code : if $mem < 1024 { $retvalue = "128M" } elsif $mem < 7000 { $retvalue ...
user avatar
  • 13
1 vote
1 answer
558 views

How to customize munin alert message text

So, I use munin to monitor a couple hundred servers and I love it. I am trying to tweak the alert text to look a little different however, and I'm not understanding how to get it to do what I want. I ...
user avatar
  • 1,013
2 votes
1 answer
6k views

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-...
user avatar
2 votes
1 answer
1k views

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....
user avatar
1 vote
1 answer
136 views

SQL Server 2005 DROP LOGIN syntax error

This snippet of code (it's just a repeater, not the actual code I'm going to run) throws a syntax error on the DROP LOGIN command: declare @obso_user varchar(16) set @obso_user = 'BEN_VA\20362781' ...
user avatar
  • 211
1 vote
3 answers
164 views

How to use the join statement in MSSQL correctly? [closed]

I am pretty new to SQL and I already read something about joins , but coudn't find out. I painted my scenario here : I want to update the Firstname of Table1 into Temp1 where the CreateTS of the ...
user avatar
  • 1,441
0 votes
1 answer
2k views

What is wrong with my apache2 server?

I edited the file /etc/apache2/sites-enabled/000-default and then tried to restart my apache server and this error came up: Syntax error on line 20 of /etc/apache2/sites-enabled/000-default.save: ...
user avatar
  • 11
2 votes
5 answers
552 views

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....
user avatar
  • 485
1 vote
2 answers
2k views

Yum command to downgrade packages

I need to downgrade php on a server and found the command below. Something seems to be wrong with the syntax. yum downgrade $(rpm -qa --qf "%{NAME} " | \ grep -v ioncube | grep ^php | ...
user avatar
1 vote
2 answers
105 views

What is this specific shell script statement validating?

I'm not a good Shell Script expert. Can somebody help me to understand and explain the statement [ ! -z ${TRUE:-} ] && [ ${TRUE:-} == 'true' ] &&from the following snippet. What is ...
user avatar
  • 1,439
52 votes
2 answers
42k views

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

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 ...
user avatar
  • 2,088
2 votes
1 answer
231 views

Why can't I select from a table named range without using backticks?

I'm facing a problem with mysql. A query select * from range; works on mysql 5.0.22 but does not work mysql 5.1.61. but it works with backtick: i.e. select * from `range`; Kindly help in this ...
user avatar
  • 781
1 vote
1 answer
581 views

MySQL Syntax error when trying to reset Joomla password

I'm trying to reset my Joomla admin password by executing the following code in MySQL: INSERT INTO `jos_users` (`id`,`name`, `username`, `password`, `params`) VALUES (LAST_INSERT_ID(),'Administrator2'...
user avatar
  • 279
1 vote
1 answer
765 views

Exchange 2010 Cmdlets for Sent Items in a Distribution group

Here is the scenario that I am in and am stuck on how to get this the correct way. What I'm looking for is a syntax that will provide me with statistics on what users have emailed "Sent" for the day. ...
user avatar
1 vote
3 answers
1k views

Syntax error at '{'; expected '}' when using nagios in puppet

It's a big problem to me, because I'm not familiar with puppet. ERROR on the puppetmaster: debug: importing '/etc/puppet/manifests/nodes/group-1.pp' err: Could not parse for environment production: ...
user avatar
0 votes
2 answers
1k views

How can I check the syntax of another PHP script in PHP before it is include()'d

In PHP I am making a kind of bot which dynamically includes a few different PHP files. Since these PHP files may change, I would like the files to be checked for syntax/parse errors before the include(...
user avatar
  • 3
0 votes
1 answer
13k views

Syntax error near unexpected token `fi'

I have been trying to write a while loop bash script that will check the size of two directories, and echo that out to a text file in the www folder. After my while loop stubbornly refused to work, I ...
user avatar
-3 votes
1 answer
307 views

what is SSH, how to learn it's syntax and [closed]

i want to know what SSH really is ? does it work with all servers ? (linux or win based) what's the reference to learn it's syntax. and is there a way to experience it on local machine ?
user avatar
  • 101
1 vote
1 answer
922 views

BASH quoting for sudo su user -c

I need to run the following command: sed -i 's/^/command="\/bin\/false",no-agent-forwarding,no-pty,no-X11-forwarding, /' ~/.ssh/authorized_keys within sudo su user -c I think I've spent about 3 ...
user avatar
  • 140
0 votes
1 answer
269 views

Apache print syntax errors to console instead of logfile

Some of my apache configs are failing like this (because of a bug in control panel, but I need a workaround till this gonna be fixed): /etc/init.d/httpd start Starting httpd: Syntax error on line 30 ...
user avatar
  • 558
0 votes
1 answer
69 views

Exchange 2010 - double right brackets ( >> ) in ems every time I hit Enter

Lets say I run cmdlet such as this: [PS] C:\Windows\system32>$AllMBX = Get-MailboxStatistics -Database "SSYDrybulk? | Where-Object {$_.DisconnectDate -ne $NULL} | Select MailboxGuid, Database [...
user avatar
  • 379
10 votes
2 answers
5k views

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 ...
user avatar
  • 425
0 votes
1 answer
320 views

Portsnap error, doesn't work anymore FreeBSD 8.2

I can't seem to run portsnap anymore, there seems to be an error and /usr/ports/sysutils/portsnap doesn't exist for a reinstallation. The error I'm getting when running portsnap is: /usr/sbin/...
user avatar
1 vote
0 answers
2k views

How can I set up mysql logs so that syntax errors are logged?

I've got mysql logging log_slow_queries or whatever, and had turned on all query logging for a moment before I found it to just be spammy and thus useless. How can I log only mysql queries that ...
user avatar
  • 1,270
0 votes
2 answers
2k views

"IfModule... in Apache 2 Fedora... Whats the use?

#<IfModule mod_headers.c> Header unset Pragma FileETag None Header unset ETag ExpiresActive On <FilesMatch "\\.(ico|jpg..)$"> etc </FilesMatch> #</...
user avatar
  • 403