|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
set varibale to be output of a command
Hi there! How to set varibale to be output of a command in csh. I was using Code:
set i="date+'%y%m%d'" but the output is date+'%y%m%d' and without quites and with a single quote the output is the same ![]() Thanks in advance |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Hi. Use back-quotes. i.e. Code:
[Scotts-MBP:~] scott% echo $0 csh [Scotts-MBP:~] scott% set X=`date '+%y'` [Scotts-MBP:~] scott% echo $X 12 [Scotts-MBP:~] scott% |
| The Following User Says Thank You to Scott For This Useful Post: | ||
FUTURE_EINSTEIN (07-30-2012) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Quote:
![]() |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Command display output on console and simultaneously save the command and its output | satimis | UNIX for Dummies Questions & Answers | 7 | 01-25-2009 07:27 PM |
| How to use a varibale in sed | St.Fartatric | Shell Programming and Scripting | 8 | 05-30-2008 03:04 AM |
| passing of a varibale to subshell | AbhishekG | Shell Programming and Scripting | 3 | 05-25-2008 09:49 AM |
| Varibale to NULL or ZERO | u263066 | Shell Programming and Scripting | 2 | 09-06-2006 07:12 AM |
| passing result of query to a varibale in ksh script | ammu | Shell Programming and Scripting | 2 | 07-27-2006 01:05 AM |
|
|