Questions tagged [syntax]

Questions about the particularities in the symbols that commands and programming languages require for a proper structure.

Filter by
Sorted by
Tagged with
0 votes
1 answer
286 views

Syntax error near unexpected token ('

Please somebody inspect my code to see why I get syntax error near unexpected token (' I have been running this code several time but all I get the same error #!/bin/bash vcf_file_dir="/10/&...
1 vote
3 answers
20k views

What is the purpose of these `NUL` characters?

This is purely out of academic curiosity, but I’ve often found files on both Windows (Windows 10 Pro; 64bit) as well as Android that are not obfuscated, but contain a bunch of NUL characters between ...
0 votes
1 answer
4k views

schtasks - Why doesn't this work?

I type this into cmd or in a batch script: schtasks /change /RP user_password /TN "existing_task" /ST H:M If /ST H:M has two digits in the hour it says ERROR: The parameter is incorrect. If /ST H:M ...
1 vote
1 answer
5k views

The service cannot find the resource identified by the resource URI and selectors

When run winrm set -? command, I can see the following example how to disable a listener: C:\Users\Administrator>winrm set -? Windows Remote Management Command Line Tool winrm set RESOURCE_URI [-...
3 votes
2 answers
683 views

Powershell and Get-ChildItem - why does adding a parameter change the output format?

If I write something like this... $files = Get-ChildItem c:\my_files | sort LastAccessTime foreach($file in $files) { Write-host "file is <$file>" } I get a list of filenames. (...
1 vote
1 answer
4k views

Adding Markdown Syntax recognition to NotePad++ via UserDefineLang.xml

I want to add Markdown as a language to NotePad++. I've downloaded the UserDefineLang.xml file from this GitHub Project. As I understand it, I am supposed to simply copy the UserDefineLang.xml file ...
0 votes
0 answers
52 views

How do you mix string literals with format operators on tmux?

I know I can use some Format operators such as #{=-2:my_format} It will be a negative trimming of 2 , on my_format , such as say my_format = prefix :display -p "#{=-2:prefix}" It will ...
1 vote
1 answer
178 views

tmux %if %else %endif syntax misbehaving when using a String Comparison statement on a format variable invoked on .tmux.conf

I am trying to achieve the functionality of be able to understand when a certain Window in 'tmux' is above or below 10. So I have used the following on my ~/.tmux.conf, which I am sourcing from ...
0 votes
1 answer
105 views

Regedit key is not found

Powershell: $paths = @( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpLockdownFiles\%SystemRoot%/System32/drivers/3ware.sys" ) foreach($path in $paths) { ...
1 vote
2 answers
93 views

FFMPEG Not Accepting Set Variable %~n1

The script is to process images named Image1.png thru Image10.png. The images are resized then the resized image is converted to video with same file name with extension mp4. Please consider the ...
0 votes
1 answer
202 views

Compile Error: Syntax error

Can someone please let me know where the error is in the below code? Is it that the list is too long? I don't know why I'm getting the syntax error. Grateful for any help you can provide. Private Sub ...
0 votes
0 answers
154 views

Can I get the IP address of device using MAC address? or logs of IP used by MAC address?

I been using debian linux version Stretch it seems arp command is helpful but it only collect those online devices
1 vote
1 answer
923 views

Is there a regex symbol to break the syntax into multiple lines?

TLDR; Is there a symbol for breaking up a regex syntax into several lines? In Bash, for example: '{beginning och insanely long command \ continuing on a second line}' You use \ to split long lines ...
1 vote
1 answer
294 views

Would any platforms have problems with missing PHP closing tags?

I've come across some open source PHP files that start with the expected <?php but do not contain a ?> to end it. As far as I can tell, they work fine on Apache with PHP 8.0 Which platforms (if ...
19 votes
1 answer
13k views

Custom gedit Syntax Highlighting for Dummies?

I want to make (have, actually) a custom syntax highlighting for gedit. There would be just a few different items: A line that begins with 2 tabs. ----- One color. A line that begins with 3 tabs. ---...
1 vote
5 answers
4k views

What is the meaning of pri=42

When mounting a swap partition on Linux, what does the mount option pri=42 mean? fstab: /dev/hda1 swap swap pri=42 0 0
0 votes
1 answer
418 views

VBA Syntax error calling Shell object

In my VBA script, I have written code to create another .vbs script and write a line of code to that script. Here is the code: Set a = fs.CreateTextFile("C:\Users\user\documents\invis.vbs", ...
0 votes
0 answers
842 views

Linux POP v20 How do I remove all password requirements?

Goal: I want to skip all passwords requirements in my new distro Pop OS v21 I don't want to learn Linux I just want to use the end product. How do I ask mister sudo, please skip all password dialog ...
12 votes
2 answers
12k views

What do short names / verbs like <leader>, <C-r> mean in Vim?

I'm using Vim for a while now, starting to like it more and more. But when searching for some new features that Vim has in it's goodie bag, I'm often slapped in the face with things like <Leader>...
1 vote
1 answer
178 views

How do I nest a Windows FOR command in the 'set' of another FOR command?

I have a directory of configuration files. If a file contains a 'STATE = 3' entry, I want to extract the value of the TCPHOST entry and the name of the file. There are a lot of nested quotes in that ...
1 vote
0 answers
162 views

Change default directory in putty after login (Windows 10) [duplicate]

Currently have a bat file set up to auto log into putty (cd "C:\Program Files\PuTTY" start PUTTY.exe -ssh "Sever IP" -l "User Name" -pw "Password") WORKS FINE!! ...
0 votes
1 answer
263 views

Unexpected behaviour with openssl dgst

I'm working with HMAC codes. I use two different methods and I obtain two different results :( Use command line: echo "text" > auxFile openssl dgst -hmac key auxFile Output: HMAC-SHA256(...
21 votes
1 answer
8k views

HTML - Historical or technical reason for target="_blank" with underscore?

Until today I am wondering why target="_blank" has not become target="blank". I am sure the browsers could understand this as well. Are there any historcal or technical reasons for this decision / ...
0 votes
1 answer
222 views

Visio VBA "Expected: end of statement" error

This has me stumped. It worked fine when I first wrote this code a few days ago. Now, though, it is as if Visio thinks the syntax is incomplete or incorrect. I am getting this error: I wondered if it ...
0 votes
0 answers
221 views

How do I use a batch file to convert directory name to one with backslashes before spaces for use in linux shell

I am writing a batch script in windows 10 to move files from a specific folder on my android phone to my computer and then delete the files on my phone. I would like to only have to define only one ...
242 votes
6 answers
154k views

In bash, how do I escape an exclamation mark?

I want to do something like bzr commit -m "It works!". I can sort of escape the exclamation mark by doing bzr commit -m "It works\!". However, then my commit message includes the backslash. How do I ...
2 votes
1 answer
436 views

How to add two name servers in DNS forward file?

This is my DNS forward file and it gives me error when I want to run it as a service. I think it's a syntax error but don't know how to correct it? $TTL 86400 @ IN SOA ns1.sudia.com. root.sudia....
17 votes
1 answer
13k views

crontab day of week vs. day of month?

I added this to /etc/crontab on a few different linux & freebsd systems: # monthly reboot: 3rd Tuesday of every month 56 07 15-21 * 2 root /sbin/shutdown -r now I want a reboot on the 3rd ...
0 votes
1 answer
114 views

Find and associate a value in multiple excel spreadsheets

I looked over the internet for a similar problem but I can't find it, so it would be great if you can help. Or maybe I am not asking the correct questions to find the answer. What I want to do is ...
7 votes
4 answers
12k views

Checkbox in Mediawiki syntax?

Is there a way to insert an HTML checkbox in Mediawiki syntax? <input> doesn't appear on their list of blessed tags, so I can't just insert it. (FWIW, this is for a private documentation page ...
7 votes
4 answers
6k views

Vim syntax highlighting lost on single file

I have a strange thing happening on a single file. When I open the file under it's original name, the highlighting is lost (":syntax on" does nothing). But if I cp that file with another name and open ...
1 vote
2 answers
379 views

Excel syntax bubble obscures column headers

The screenshot should say it all really. I keep getting frustrated with the Excel syntax bubble obscuring the column headers. My columns are often narrow and my formulas often refer to whole columns, ...
0 votes
1 answer
1k views

Copy a file with a path with spaces in it, in wsl using powershell?

Scenario I experienced mild difficulties using powershell to command the wsl to copy a file from a path that contains a space. Neither did I find an example for this specific case. Therefore I ...
0 votes
2 answers
760 views

Syntax error near unexpected token '(' while trying to move files

So I'm trying to follow the solution from this thread: CMD Command to create folder for each file and move file into folder as I want to do the same thing OP of that thread wanted to. I've manually ...
0 votes
1 answer
769 views

Script doesn't run anymore after upgrading to python 3.7.3

Just a beginner question, I upgraded python from 2.7.10 to python 3.7.3. Ran some scripts but nothing works anymore. So in the basis entered this code to check: a=("hello world") print(a) and still ...
3 votes
1 answer
587 views

Why is Sublime Text 3.2 highlighting commas after values that start with "for" in Python dictionaries?

In the most recent version of Sublime Text (3.2 Build 3200), I have encountered what I think is a syntax highlighting error when writing in Python. Whenever I create a dictionary that has a key/value ...
2 votes
1 answer
537 views

Bash script with another command inside of quote

Trying to execute a command like $ sdiff -i -W -B -l -w 140 <(curl -s "https://domain.tld/query.php?d=$(date +%Y%m%d)") <(curl -s "https://domain.tld/query.php?d=$(date --date="yesterday" +%Y%...
17 votes
2 answers
10k views

Program for creating language syntax/grammar "railroad" diagrams? [closed]

I'm looking for the program that JSON, SQLite and other projects are using to create the diagrams used for their language syntax, if there is a particular program. All of the diagrams have a similar ...
1 vote
1 answer
3k views

How to use find -iregex OR (|) operator?

Uninstalled an application, but it continues to pop up whenever I try to interact with file types that it used to be associated with. As usual, find has been invaluable in finding and eliminating ...
-1 votes
2 answers
2k views

Curl command what do I make wrong? [closed]

I get: root@dm820:~# ExecStart=/usr/bin/curl'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net' -sh: --header: ...
4 votes
1 answer
3k views

What does `@` represent when dealing with Windows registry keys?

What does @ represent when dealing with Windows registry keys? Examples:
3 votes
1 answer
25k views

How to pass multiple arguments?

How to pass multiple paramaters for Start a program action in Windows Task Scheduler for a batch file? There's no built-in syntax hint...
1 vote
1 answer
1k views

Compile error: Syntax Error in Excel

I cannot find a solution for this error, I am a beginner in Excel Macro and am trying to use this code to create a dropdown menu that autofills like a google search from Data Validation.
11 votes
2 answers
17k views

Windows Command line: Is there any way to check syntax of bat file without actually running it?

Windows Command line: Is there any way to check syntax of bat file without actually running it?
7 votes
5 answers
12k views

Explanation of command to uppercase the first letter of a filename

I'm trying to learn to rename files with the command line, and after browsing around a lot of pages I finally found a command that uppercases the first letter of a file, but the problem is that I want ...
2 votes
1 answer
231 views

If "a:domain.com" is used, would it include emails sent from *@subdomain.domain.com address?

Supposedly I have example.com domain and would like it to allow mails sent from subdomain.domain.com. If the spf record should verify emails sent from *@subdomain.domain.com address (or mailed-by: ...
1 vote
0 answers
289 views

syntax highlighting for python not working in vim for Windows

I want to use Pretty-Python-Vim in windows and have installed the necessary packages an placed .vim directory as described in the website. However even after doing the necessary changes in my vimrc ...
10 votes
2 answers
33k views

How can I sort ls by owner and group?

How can I list directories with ls and sort them by their owner and group?
0 votes
1 answer
275 views

File item renaming with brackets

I'm using macOS X, inputing this into the terminal to rename some stuff: find /Users/Ad//Desktop/Project/src/ -type f -name '*.java' -exec perl -pi -w -e 's/getGreenObject()/newObject("green")/g;' {} ...
0 votes
1 answer
64 views

How do I rename all items in files in folder in folder in folder?

I'm using a MacOS X. I know that this code in the terminal will replace all txt files that include "hello" with "hiThere" in the folder named "world": perl -pi -w -e 's/hello/hiThere/g;' ~/Desktop/...