Questions about the particularities in the symbols that commands and programming languages require for a proper structure.
Questions tagged [syntax]
136 questions
244
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
- 15,036
46
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,229
22
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,844
20
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
- 750
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,585
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
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
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,547
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,449
13
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,562
13
votes
3 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
- 263
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
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
- 395
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
- 1,015
8
votes
1 answer
What does `@` represent when dealing with Windows registry keys?
What does @ represent when dealing with Windows registry keys?
Examples:
voices
- 2,881