summaryrefslogtreecommitdiffstats
path: root/noise
diff options
context:
space:
mode:
authorroot <root@krebs>2011-09-09 18:20:34 +0200
committerroot <root@krebs>2011-09-09 18:20:34 +0200
commit176c9ac08ad9c2ddc430b2d1a194f6be41115f5b (patch)
tree82ea214ff1d45799099576e4ff007c34a6b7c990 /noise
parentdac9eb2553987778500e0bc7e54ad2a28124969d (diff)
parent150ce5757d2982da740bd9ce2b44b57b6d2831c6 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'noise')
-rwxr-xr-xnoise/noise8
1 files changed, 5 insertions, 3 deletions
diff --git a/noise/noise b/noise/noise
index 99a08023..615277a6 100755
--- a/noise/noise
+++ b/noise/noise
@@ -31,8 +31,8 @@ noise_set() { # set a variable
fi
## write variable to $env
if grep -q "^$1=" "$env" ; then
- env_cache="`cat $env`"
- echo "$env_cache" |
+ cache="`cat $env`"
+ echo "$cache" |
sed "s'^\($1\)=\(.*\)\$'\1=\'$2\''" > $env
else
echo "$1='$2'" >>$env
@@ -49,7 +49,9 @@ noise_unset() { # unset a variable
case $# in
(1) ##
unset "noise_$1"
- sed -ni "/^$1=/!p" $env
+ cache="`cat $env`"
+ echo "$cache" |
+ sed -n "/^$1=/!p" > $env
;;
(*)
fail "broken commandline: $@"