help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Can anyone explain this?


From: Bill Gradwohl
Subject: [Help-bash] Can anyone explain this?
Date: Fri, 4 May 2012 15:52:51 -0600

#!/bin/bash

declare -r Debug='yes'

prepArea() {
   local -r Debug='x'
echo hello "${Debug}" there
exit
}

prepArea
exit 0
======================
Produces:
address@hidden ycc# ./xxx
./xxx: line 6: local: Debug: readonly variable
hello yes there


I think this is a bug.

--
Bill Gradwohl


reply via email to

[Prev in Thread] Current Thread [Next in Thread]