Questions tagged [syntax]
65 questions
1
vote
1 answer
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'
DROP LOGIN @obso_user
Does anyone know why?

RonJohn
- 223
- 1
- 8
1
vote
3 answers
How to use the join statement in MSSQL correctly?
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 matching ID in Table2 is < 08.02.2014
for that I…

RayofCommand
- 1,451
- 8
- 26
- 36
1
vote
2 answers
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 | awk '{print $1"-5.2.17"}')
I get the following…

ddjammin
- 33
- 1
- 5
1
vote
2 answers
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 this specific statement doing and/or being validated for?
However,…

Gnanam
- 1,459
- 13
- 26
- 32
1
vote
1 answer
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
- 279
- 1
- 3
- 11
1
vote
1 answer
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.
I would like to know get information on what all…

Jimmy Jones
- 31
- 1
- 2
1
vote
1 answer
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 hours reading quoting guides, similar examples, and…

bVector
- 140
- 2
- 10
1
vote
0 answers
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 result in syntax errors?

Kzqai
- 1,278
- 4
- 18
- 32
1
vote
1 answer
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 },
{ ipaddr: 192.168.1.xx, etheraddr:…

John Doe
- 125
- 1
- 7
1
vote
1 answer
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-Computer -UnjoinDomaincredential nsmg\svc_unjoindomain…

user944655
- 11
- 1
- 2
1
vote
2 answers
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
# DO SOMETHING
exit 1
else
# DO SOMETHING
fi
leads to the…

Omexlu
- 43
- 1
- 9
0
votes
1 answer
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 error ''
root@app-server[192.168.100.83] ~…

ychaouche
- 262
- 4
- 15
0
votes
1 answer
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 sequence numbers, am I right ?
But what is 11201 and…

yeedooz
- 3
- 1
0
votes
1 answer
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 random password to be used by the user module in a…

Nicolas
- 15
- 1
- 4
0
votes
1 answer
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 have provision that will validate syntax of zone…

Rahul
- 67
- 1
- 12