Questions tagged [backticks]

For questions relating to the backtick character (`), also known as the backquote, which has various special meanings in computing.

A backtick or backquote or grave accent is the character,

       `

On British and American QWERTY keyboards, this is located in the upper left corner, next to the 1 key. It is notoriously difficult to type on some European keyboards, requiring up to four keystrokes.

Backticks were introduced by Unix shells to run a sub-shell. The concept has been adopted by other languages and tools such Perl, PHP, Ruby, and Make. The newer alternative syntax $(<command>) in POSIX-compliant shells is more flexible as it allows nesting.

In Python 2, backticks enclose an expression to be evaluated and converted to its string representation. This feature was removed in Python 3, as it was deemed not sufficiently beneficial to warrant the syntax. The same effect can be accomplished with repr() instead.

In Markdown, backticks are used as a shorthand for emitting <code></code> tags in HTML.

In TeX typesetting, a backtick renders as an opening curly quote (‘).

In the programming languages D and Go, backticks surround string literals.

Further uses of backticks in computing can be found in the Wikipedia article on the grave accent.

311 questions
2
votes
0 answers

syntax highlighting of special text fragment

I have this within a Eclipse IDE javascript-editor: let a = `test ${value}` Within Eclipse->Preferences->Editor->Syntax-Coloring->JavaScript->Template literal I can choose the color of this template literal. However, I want to set only the…
nimo23
  • 5,170
  • 10
  • 46
  • 75
2
votes
2 answers

Backtick for Get-ADUser multi-line filter in PowerShell

I'm having trouble using backtick (grave accent) for multi-line filter expression in PowerShell with the Get-AdUser command. Specifically I'm testing PowerShell 2.0 on Windows 7. A working example (filter is all on one line): Get-ADUser -Filter…
Mister_Tom
  • 1,500
  • 1
  • 23
  • 36
2
votes
2 answers

how to escape the < <() idiom in perl

I have a system command which i am trying to execute, but it gives me error "Syntax error: redirection unexpected" Trying command: datamash -ft, -g 1 mean 3 mean 4 < <(tail -n +2 yourfile | sort -t, -k1,2) | cut -d, -f1,2,5,6 I tried readpipe…
ran1n
  • 157
  • 6
2
votes
3 answers

Add backticks in creating table to mysql with csv file -PHP

I have a php code that will create a table to mysql database using a csv file. However, some column headers are not being read by mysql. The only time that mysql will read the query is when I add backticks(`). Can you help me on where to put…
Rukikun
  • 271
  • 3
  • 19
2
votes
2 answers

wrong use of backticks execution?

I tried to run a command by reading it from a textfile, but it failed. when i enter the exact same line it is working, tough. im suprised that it did even try to execute the move command, but got an errormessage that translates to "File or directory…
vecvan
  • 23
  • 3
2
votes
1 answer

R encoding ASCII backtick

I have the following backtick on my list's names. Prior lists did not have this backtick. $`1KG_1_14106394` [1] "PRDM2" $`1KG_20_16729654` [1] "OTOR" I found out that this is a 'ASCII grave accent' and read the R page on encoding types. However…
avari
  • 105
  • 5
2
votes
2 answers

double backslashes of sed single-quoted command inside command substitutions get translated to a single backslash

printf '%s' 'abc' | sed 's/./\\&/g' #1, \a\b\c printf '%s' "`printf '%s' 'abc' | sed 's/./\\&/g'`" #2, &&& The expression inside the second backticks returns \a\b\c, and we have printf '%s' "\a\b\c", so it should print…
pdg
  • 103
  • 8
2
votes
4 answers

creating tidy shell script from ugly command line pipeline

I wrote a piped shell command that has multiple pipes in it that works great. I now want to put this in the form of a (tidy) shell script. Here is the script: #!/bin/bash for number in `cat xmlEventLog_2010-03-23T* | sed -nr "/
amadain
  • 2,724
  • 4
  • 37
  • 58
2
votes
0 answers

WebStorm: How to align html template in TypeScript/ES6

I'd like to align/format the html code between the backticks. Is there a setting in WebStorm to achieve this? @Component( { selector: 'my-app', template: `

{{title}}

My Heroes

2
votes
2 answers

netbeans javascript error on template string (backticks)

i've installed the latest (complete) version of netbeans (v 8.1) and node.js to learn node.js (Javascript) on my Windows 7 machine. I created a new Node.js Application Project but I get errormessages when i write template strings like…
2
votes
1 answer

How do you use wildcards or any other special character in quotes, single quotes or backtick?

How do you use wildcards or any other special character in quotes, single quotes or backtick? and How do you make it so Linux doesn't take it literally? For example echo "This is my list of file ls -l" I know their is another way of doing it for…
user6260366
  • 47
  • 1
  • 7
2
votes
1 answer

How do I receive command output immediately?

I'm using perl back-ticks syntax to run some commands. I would like the output of the command to written to a file and also printed out to stdout. I can accomplish the first by adding a > at the end of my back-ticked string, but I do not know hot to…
David B
  • 29,258
  • 50
  • 133
  • 186
2
votes
3 answers

Tail command used in perl backticks

I'm trying to run a tail command from within a perl script using the usual backticks. The section in my perl script is as follows: $nexusTime += nexusUploadTime(`tail $log -n 5`); So I'm trying to get the last 5 lines of this file but I'm getting…
iLoveWagons
  • 1,091
  • 4
  • 17
  • 30
2
votes
2 answers

sh: 1: Syntax error: redirection unexpected when using backticks perl

my $mysql_cmd = 'debconf-set-selections <<< \'mysql-server mysql-server/root_password password 6ygr\' ;debconf-set-selections <<< \'mysql-server mysql-server/root_password_again password 6ygr\'; '.our $install_cmd." mysql-server"; my $mysql_stat =…
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
2
votes
1 answer

Using backticks (``) in MySQL when replication is enabled

The story I've recently setup replication on my MySQL server. I went down the route of Master - Master replication (2 servers, each is Master and Slave to the other, as described here -…