Questions tagged [syntax]

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

136 questions
240
votes
6 answers

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 escape the exclamation mark, while still ignoring…
Matthew
  • 14,496
  • 18
  • 73
  • 119
43
votes
4 answers

In a URL, what is // for?

Typically, when I see //, it's usualy following some protocol prefix like http: or ftp:. I have never seen it placed anywhere else. For example, http://www.google.com/ is a typical URL. However, I found the following two syntaxes to yield…
Chad Harrison
  • 6,069
  • 13
  • 44
  • 60
20
votes
1 answer

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 / specification?
Avatar
  • 2,555
  • 4
  • 36
  • 50
18
votes
4 answers

Difference between '{}' and {} in find command?

In the documentation, I see usage both ways: find . -type f -exec file '{}' \; find repo/ -exec test -d {}/.svn -o -d {}/.git -o -d {}/CVS ; \
tarabyte
  • 2,133
  • 7
  • 37
  • 42
18
votes
1 answer

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. ----- Another color. A line that begins with 4 tabs.…
YAS
  • 720
  • 3
  • 11
  • 21
17
votes
2 answers

Program for creating language syntax/grammar "railroad" diagrams?

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 style, with partially curved connections or…
ssube
  • 920
  • 6
  • 13
17
votes
1 answer

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 TUESDAY of every month. However, all the systems rebooted…
ane
  • 173
  • 1
  • 1
  • 5
16
votes
2 answers

What bash < < syntax mean?

Ruby Version Manager (RVM) installed like so: bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) I understand what first < mean (feeds bash script to bash interpreter), I'm confused with <(...) part.…
Nemoden
  • 2,437
  • 3
  • 25
  • 30
16
votes
3 answers

How to read Unix usage

I did some searching, but I cannot find documentation on how Unix usage works. I know something (mostly through trial and error) but, for example, how do I know that /usr/bin/ls [-aAbcCdeEfFghHilLmnopqrRstuvVx1@] [file]... means that you can…
sixtyfootersdude
  • 8,049
  • 16
  • 52
  • 71
13
votes
5 answers

How is \$ being interpreted by grep?

When I write $ grep \$ then whatever I type on terminal, is matched and printed on terminal. How is \$ being interpreted?
Happy Mittal
  • 289
  • 1
  • 2
  • 6
12
votes
2 answers

How can I see the available Windows Search Filters?

I've often wondered how to use Windows Search Filters. The available documentation is extremely limited, but its potential uses are quite large. When I type something, the only search filters I see are "Date modified" and "Size". Googling shows me…
Abel
  • 1,421
  • 5
  • 18
  • 38
12
votes
2 answers

What do short names / verbs like , 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 , etc... I'm feeling really stupid for not being…
Ambidex
  • 385
  • 1
  • 3
  • 16
10
votes
2 answers

How can I sort ls by owner and group?

How can I list directories with ls and sort them by their owner and group?
AnnanFay
  • 895
  • 3
  • 11
  • 25
9
votes
2 answers

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?
JosephDoggie
  • 213
  • 1
  • 4
  • 9
7
votes
4 answers

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 it, the syntax highlighting returns. If I mv…
seyDoggy
  • 83
  • 1
  • 5
1
2 3
9 10