![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| after grep i want to redirect it to some variable | mail2sant | Shell Programming and Scripting | 2 | 04-07-2008 09:26 AM |
| Redirect to variable | MrAd | UNIX for Dummies Questions & Answers | 2 | 05-07-2007 04:18 PM |
| Redirect Output In Variable | ZINGARO | UNIX for Dummies Questions & Answers | 1 | 08-02-2006 06:56 AM |
| Redirect from Variable to command line?? | ugh | UNIX for Dummies Questions & Answers | 8 | 03-28-2006 10:31 AM |
| please help: how to redirect input into a variable | artur80 | Shell Programming and Scripting | 2 | 11-17-2002 10:18 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
redirect cat to variable
hello
just i saw a really strange for cat i have file (file1) contains line /home/rajiv/proj1/*.txt now applied a commonds DDPATH="$(cat file1)" echo $DDPATH it shows all the txt files in that folder like /home/rajiv/proj1/read1.txt /home/rajiv/proj1/read2.txt /home/rajiv/proj1/read3.txt ...... but i need only /home/rajiv/proj1/*.txt. can anyone helps shailesh |
|
||||
|
It does work for me...
Here's the file output bash-2.05b$ cat file1 /home/hemanth/*.txt ...and here are my commands... bash-2.05b$ DDPATH=`cat file1` bash-2.05b$ echo "$DDPATH" /home/hemanth/*.txt Send me your output so that I can check. |
|
||||
|
cat
yes if we do echo "$DPATH" it gives proper result. but when i want to use this variable for another use like as below -
Code:
for f in "$DPATH" `find -type f`; do processLine done BR shailesh Last edited by radoulov; 07-10-2008 at 04:35 AM.. Reason: please use code tags |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|