Bash Script question
From: Hanna Lord (hanna.lord_at_tokenbay.co.uk)
Date: 08/03/04
- Next message: Måns Rullgård: "Re: Bash Script question"
- Previous message: Kasper Dupont: "Re: displaying console in a x application"
- Next in thread: Måns Rullgård: "Re: Bash Script question"
- Reply: Måns Rullgård: "Re: Bash Script question"
- Reply: Larry I Smith: "Re: Bash Script question"
- Reply: Hanna Lord: "Re: Bash Script question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 2 Aug 2004 23:33:10 +0100
Hi all,
I am not sure if this is the correct newsgroup to post in, apologies if it
is... I have been racking my brain with a BASH script problem, I have the
following script which does not work as I expect:
---- START OF SCRIPT ----
#!/bin/bash
project=`echo $PROJ`
echo "project = $project"
ab=`echo $project/scripts | sed 's#$project#/#g'`
echo "result = $ab"
---- END OF SCRIPT ----
I have set the environment variable of PROJ to /home/example
proj = /home/example
ab = /home/example/scripts
I was expecting ab to be:
ab = /scripts
Can anyone help me please, I have racked my brain and can't see the mistake.
Cheers
- Next message: Måns Rullgård: "Re: Bash Script question"
- Previous message: Kasper Dupont: "Re: displaying console in a x application"
- Next in thread: Måns Rullgård: "Re: Bash Script question"
- Reply: Måns Rullgård: "Re: Bash Script question"
- Reply: Larry I Smith: "Re: Bash Script question"
- Reply: Hanna Lord: "Re: Bash Script question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]