![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Clouding and Confusing the CEP Community | iBot | Complex Event Processing RSS News | 0 | 04-20-2008 04:40 AM |
| (Need Help) confusing format on solaris 10 | bucci | SUN Solaris | 7 | 03-25-2008 04:23 AM |
| awk Shell Script error : "Syntax Error : `Split' unexpected | Herry | UNIX for Dummies Questions & Answers | 2 | 03-17-2008 08:16 AM |
| error during run: St9bad_alloc - Getting this error while using some conversion progr | sathu_pec | Shell Programming and Scripting | 1 | 01-20-2008 11:38 PM |
| Error: Internal system error: Unable to initialize standard output file | firkus | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 12:23 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Confusing Error
Hi all,
Just subscribed to this forum. Not a regular user of Unix. I did the following: We have a directory structure /a/b/c5/ Where c5 is the only directory inside b. export ANOOP=/a/b/c*/ echo $ANOOP=/a/b/c5/ I have to create a symbolic link to anoop.txt in the directory /a/b/c5/d/. ln -s $ANOOP/d/anoop.txt $ANOOP/d/anoop1.txt ln: creating symbolic link `/a/b/c*/d/anoop1.txt` to `/a/b/c5/d/anoop.txt` : No such file or directory When I tried echoing "$ANOOP/d" the whole path was printed(/a/b/c5/d), however when i tried to echo a non existing file in the same path it couldnt convert c* into c5. Which might have been the issue for the above link issue also. echo $ANOOP/d/anoop1.txt=/a/b/c*/d/anoop1.txt. Could any of you help me figure out any way to tackle this particular issue. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
The wildcard is expanded when you echo it, not when you assign it. Try adding those backticks which I otherwise always try to persuade people to avoid.
Code:
ANOOP=`echo /a/b/c*/` set | fgrep ANOOP # verify what's set without possibly expanding it |
|
#3
|
|||
|
|||
|
Quote:
Thanks a Lot era. My issue is solved. I could succesfully create the link. |
|||
| Google The UNIX and Linux Forums |