Sponsored Content
Full Discussion: Nesting backticks
Top Forums Shell Programming and Scripting Nesting backticks Post 302791009 by ahamed101 on Sunday 7th of April 2013 03:36:20 PM
Old 04-07-2013
Use $( )

Code:
val=$( echo $( echo $( echo "abc" ) ) )
echo $val
abc

--ahamed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

zip nesting empty folders

I'm using the following command to zip a project file, but when it finishes, the resulting zip file contains all the directories above the file I wanted zipped, myapp.app, each one empty until you get to the actual app. zip -r myapp.app.zip ... (0 Replies)
Discussion started by: groundlevel
0 Replies

2. Shell Programming and Scripting

Backticks within backticks?

Hi, I'm trying to do something like this: range= `expr `date '+%m'` - 1` and it does not work. How can I tell it to evaluate an expression within another expression evaluation? I was at first worried that `date '+%m'` would return a string but apparently expr does the math okay normally, so the... (3 Replies)
Discussion started by: jeriryan87
3 Replies

3. Shell Programming and Scripting

How to ignore STDERR when nesting commands?

I have a pel script running as root that needs to read the contents of a file on a remote system, I have an ssh trust relationship as a particular user but not as root. I then need to write back out to that file again to change it's content a bit. On the surface this seemed really easy but... (3 Replies)
Discussion started by: Smiling Dragon
3 Replies

4. Shell Programming and Scripting

Am I abusing backticks?

I'm always concerned I might be abusing backticks within my scripts. A current script I'm writing has this for example: stripscriptname=`echo $scriptname | sed 's/\(.*\)\..*/\1/'` stripsearch=`echo $searchpattern | tr -d ' ,/'` Both of these variables are set inside the script (in fact,... (2 Replies)
Discussion started by: mglenney
2 Replies

5. Google Chrome OS

Case Nesting

sdfdefgsrg (2 Replies)
Discussion started by: frankycool
2 Replies

6. Shell Programming and Scripting

BASH Varible nesting and user input

Well, I think I've managed to take two different issues and conglomerate them into and embarrasing mess. #!/bin/bash # Set some variables dir1=/path/that/isnt/variable/$variabledir/dir/ dir2=/path/that/isnt/variable/$variabledir/important/"$variabledir"-subdirectory/path/ echo "Gimme... (7 Replies)
Discussion started by: karlp
7 Replies

7. Shell Programming and Scripting

Difference between using xargs and backticks

Hey all. Just a fast question, what is the technical difference between using back ticks and using xargs to perform a command? Here's an example Find /mydir -name *.conf |xargs rm Vs Rm 'find /mydir -name *.conf' Is there a performance hit? I know they do the same thing but which is... (1 Reply)
Discussion started by: msarro
1 Replies

8. Shell Programming and Scripting

SSH and Backticks [solved]

I have been testing a new script and cannot figure out why my `cat spath` will not execute on the remote machine? sudo ssh -p 22344 -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.1.6 "find `cat spath` -depth" cat: spath: No such file or directory but... (0 Replies)
Discussion started by: metallica1973
0 Replies

9. Shell Programming and Scripting

Bash - Nesting if statement in for loop

I have the basic command written in bash for element in 1 2 do if ]; then set el = "t" else set el = "p" fi done but i get the following error syntax error near unexpected token `for' ` for element in 1 2' What should i do differently? (3 Replies)
Discussion started by: ncwxpanther
3 Replies

10. Shell Programming and Scripting

Issue nesting variables in csh.

The variables given are already defined ($file1-$file3, $obsid1-$obsid3, and $n=3). When I go to run the code, the terminal outputs "Missing }." I believe the error is with the nesting of variables. It would save a lot of time getting this while loop working. set i = 1 while (${i} <=... (5 Replies)
Discussion started by: ojdefdidit
5 Replies
RONN-FORMAT(7)							    Ronn Manual 						    RONN-FORMAT(7)

NAME
ronn-format - manual authoring format based on Markdown SYNOPSIS
name(1) -- short, single-sentence description ============================================= ## SYNOPSIS `name` [<optional>...] <flags> ## DESCRIPTION A normal paragraph. This can span multiple lines and is terminated with two or more line endings -- just like Markdown. Inline markup for `code`, `user input`, and **strong** are displayed boldface; <variable>, _emphasis_, *emphasis*, are displayed in italics (HTML) or underline (roff). Manual references like sh(1), markdown(7), roff(7), etc. are hyperlinked in HTML output. Link to sections like [STANDARDS][], [SEE ALSO][], or [WITH A DIFFERENT LINK TEXT][#SEE-ALSO]. Definition lists: * `-a`, `--argument`=[<value>]: One or more paragraphs describing the argument. * You can put whatever you *want* here, really: Nesting and paragraph spacing are respected. Frequently used sections: ## OPTIONS ## SYNTAX ## ENVIRONMENT ## RETURN VALUES ## STANDARDS ## SECURITY CONSIDERATIONS ## BUGS ## HISTORY ## AUTHOR ## COPYRIGHT ## SEE ALSO DESCRIPTION
The ronn(1) command converts text in a simple markup to UNIX manual pages. The syntax includes all Markdown formatting features, plus con- ventions for expressing the structure and various notations present in standard UNIX manpages. Not all roff(7) typesetting features can be expressed using ronn syntax. MANPAGE TITLE
Manpages have a name, section, and a one-line description. Files must start with a level one heading defining these attributes: ls(1) -- list directory contents ================================ Indicates that the manpage is named ls in manual section 1 ( SECTION HEADINGS
Man section headings are expressed with markdown level two headings. There are two syntaxes for level two headings. Hash prefix syntax: ## HEADING TEXT Dash underline syntax: HEADING TEXT ------------ Section headings should be all uppercase and may not contain inline markup. INLINE MARKUP
Manpages have a limited set of text formatting capabilities. There's basically boldface and italics (often displayed using underline). Ronn uses the following bits of markdown(7) to accomplish this: `backticks` (markdown compatible) Code, flags, commands, and noun-like things; typically displayed in in boldface. All text included within backticks is displayed literally; other inline markup is not processed. HTML output: <code>. **double-stars** (markdown compatible) Also displayed in boldface. Unlike backticks, inline markup is processed. HTML output: <strong>. <anglequotes> (non-compatible markdown extension) User-specified arguments, variables, or user input. Typically displayed with underline in roff output. HTML output: <var/>. _underbars_ (markdown compatible) Emphasis. May be used for literal option values. Typically displayed with underline in roff output. HTML output: <em>. Here is grep(1)'s DESCRIPTION section represented in ronn: `Grep` searches the named input <FILE> (or standard input if no files are named, or the file name `-` is given) for lines containing a match to the given <PATTERN>. By default, `grep` prints the matching lines. DEFINITION LISTS
The definition list syntax is compatible with markdown's unordered list syntax but requires that the first line of each list item be termi- nated with a colon An example definition list, taken from BSD test(1)'s DESCRIPTION section: The following primaries are used to construct expressions: * `-b` <file>: True if <file> exists and is a block special file. * `-c` <file>: True if _file_ exists and is a character special file. * `-d` <file>: True if file exists and is a directory. LINKS
All markdown(7) linking features are supported. Markdown reference-style links can be used to link to specific sections by name: ## SECTION 1 See the following section. ## SECTION 2 See [SECTION 1][] or [to put it another way][SECTION 1]. The anchor name would be #SECTION-1 and #SECTION-2. All non-word characters are removed and spaces are replaced by dashes. SEE ALSO
ronn(1), markdown(7), roff(7) Ronn 0.7.0 June 2010 RONN-FORMAT(7)
All times are GMT -4. The time now is 06:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy