Questions tagged [syntax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
235 views

nftables set of couples { IP/MAC address }

Is it possible to do something like this : set authorized { type ipv4_addr ether_addr flags constant elements = { { ipaddr: 192.168.1.xx, etheraddr: xx:xx:xx:xx:xx:xx }, ...
John Doe's user avatar
  • 127
0 votes
0 answers
80 views

Ansible Playbook

I'm trying to run a playbook with to upgrade the latest firmware on a few edge routers on my network: - name: Update External ERX with latest firmware hosts: externaledgerouters remote_user: ...
Brian Lamb's user avatar
0 votes
1 answer
578 views

Trying to understand Cloudformation syntax for UserData script

I'm trying to configure the UserData Property for an EC2 instance in Cloudformation and, when I look at the AWS example, it is very confusing. The example I'm looking at is from https://docs.aws....
Dan Carrington's user avatar
2 votes
1 answer
57 views

ZFS: Replace raidz1-member of a striped pool for raidz2

I have a pool (in Ubuntu 20 LTS) like this: # zpool status pool: zpool_test state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zpool_test ONLINE 0 ...
JakeRoberts's user avatar
4 votes
1 answer
3k 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: ^ ...
Brian Lamb's user avatar
2 votes
1 answer
1k 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 ...
Déjà vu's user avatar
  • 5,566
1 vote
1 answer
4k 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-...
user944655's user avatar
0 votes
1 answer
326 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 ...
Dave's user avatar
  • 249
1 vote
2 answers
6k 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 # ...
Omexlu's user avatar
  • 43
0 votes
1 answer
4k 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 ...
ychaouche's user avatar
  • 262
0 votes
1 answer
55 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 ...
yeedooz's 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 ...
Nicolas's user avatar
  • 15
1 vote
1 answer
915 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=...
CertifcateJunky's user avatar
2 votes
1 answer
6k 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 ...
Fabian's user avatar
  • 397
1 vote
1 answer
4k 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,...
luky's user avatar
  • 219
0 votes
1 answer
409 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 ...
Rahul's 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", ...
Putnik's user avatar
  • 2,227
0 votes
3 answers
394 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 "$(...
Zaza's user avatar
  • 127
1 vote
1 answer
533 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 / { ...
House3272's user avatar
  • 179
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: ...
alexrocksdude's user avatar
-1 votes
1 answer
109 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=...
Lars's user avatar
  • 3
-1 votes
1 answer
228 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 "...
spoon_man's user avatar
1 vote
1 answer
160 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 ...
roelvanmeer's user avatar
  • 1,764
4 votes
1 answer
53 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 ...
Dima Zyuryaev's user avatar
1 vote
0 answers
3k 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 ...
Chris Charles's user avatar
1 vote
3 answers
7k 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 ...
Swartz's user avatar
  • 304
1 vote
1 answer
282 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 ...
Tom Corelis's 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 /...
Edwin Reed-Sanchez's 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" -...
Miquel Àngel's user avatar
1 vote
2 answers
738 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 ...
FlexIt's user avatar
  • 13
1 vote
1 answer
623 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 ...
Joe's user avatar
  • 1,043
2 votes
1 answer
7k 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-...
MultiformeIngegno's 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....
Raphael Laurent's user avatar
1 vote
1 answer
207 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' ...
RonJohn's user avatar
  • 223
1 vote
3 answers
166 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 ...
RayofCommand's user avatar
  • 1,451
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: ...
Pyrason's user avatar
  • 11
2 votes
5 answers
573 views

debian bash/sh string execution

I am stuck with this piece of code here user@server:~$ TEST="ssh [email protected] 'date; hostname -A; uname -a'" user@server:~$ $TEST bash: date; hostname -A; uname -a: Command not found....
Daywalker's user avatar
  • 495
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 | ...
ddjammin's user avatar
1 vote
2 answers
110 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 ...
Gnanam's user avatar
  • 1,469
59 votes
2 answers
46k 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 ...
Mark Allison's user avatar
  • 2,188
2 votes
1 answer
247 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 ...
User4283's user avatar
  • 781
1 vote
1 answer
590 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'...
Arthur's user avatar
  • 279
1 vote
1 answer
766 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. ...
Jimmy Jones's user avatar
2 votes
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: ...
jiangchengwu's 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(...
Dead-i's 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 ...
DarthCaniac's user avatar
-3 votes
1 answer
308 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 ?
Nojan A.'s user avatar
  • 101
1 vote
1 answer
974 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 ...
bVector's user avatar
  • 140
0 votes
1 answer
275 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 ...
Spacedust's user avatar
  • 568
0 votes
1 answer
71 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 [...
MatBanik's user avatar
  • 379