|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
How 2 Redirect Outputs 2 a VARIABLE?
Hi!!
Alot of sites tells you how to redirect output of an command to a file but can anyone tell me how to redirect outputs to a shell variable? eg. How can I store the result of "echo *" to a variable call "a". Thanks |
|
#2
|
|||
|
|||
|
in bash you use backticks `` or $():
Code:
$DATE=`date +%Y-%m-%d` echo "Today is: $DATE"
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
Much appreciated
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > How 2 Redirect Outputs 2 a VARIABLE? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|