![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sed: removing backticks from certain lines | bjb | UNIX for Dummies Questions & Answers | 5 | 02-27-2008 11:20 AM |
| Perl - backticks v system in if statements | gjkeenan | Shell Programming and Scripting | 5 | 07-31-2005 07:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 problem is how to get it to evaluate an inner set of backticks within the outer set of backticks. Thanks.
|
|
||||
|
Quote:
backslash the inner back ticks - like this: echo `expr \`date '+%m'\` - 1` 6 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|