[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PE with BASH_SOURCE doesnt seem to work
From: |
alex xmb sw ratchev |
Subject: |
PE with BASH_SOURCE doesnt seem to work |
Date: |
Wed, 21 Feb 2024 07:49:13 +0100 |
i like do shorts , so i tried
the point is ' prepend PWD to BASH_SOURCE when it doesnt begin with a slash
'
but it doesnt seem working
shopt -s extglob
f=${BASH_SOURCE/#!(/)*/$PWD/&}
declare -p f
~ $ bash tbash1
declare -- f="tbash1"
~ $ bash "$PWD/"tbash1
declare -- f="/data/data/com.termux/files/home/tbash1"
the ' bash tbash1 ' case it is , it doesnt prepend anything
( i also tried [!/] instead !(/) , same result )
greets
- PE with BASH_SOURCE doesnt seem to work,
alex xmb sw ratchev <=