Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F31494551
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
jbond
Dec 30 2019, 10:45 AM
2019-12-30 10:45:56 (UTC+0)
Size
540 B
Referenced Files
None
Subscribers
None
raw.txt
View Options
$ cat t.sh
#=!/bin/sh
set -x
FETCH_HEAD_OR_EMPTY=$([ -z "${1:-}" ] || echo FETCH_HEAD)
printf 'HERE %s\n' "${FETCH_HEAD_OR_EMPTY}"
FETCH_HEAD_OR_EMPTY=${1:-FETCH_HEAD}
printf 'HERE %s\n' "${FETCH_HEAD_OR_EMPTY}"
$ ./t.sh
+ [ -z ]
+ FETCH_HEAD_OR_EMPTY=
+ printf HERE %s\n
HERE
+ FETCH_HEAD_OR_EMPTY=FETCH_HEAD
+ printf HERE %s\n FETCH_HEAD
HERE FETCH_HEAD
$ ./t.sh foo
+ [ -z foo ]
+ echo FETCH_HEAD
+ FETCH_HEAD_OR_EMPTY=FETCH_HEAD
+ printf HERE %s\n FETCH_HEAD
HERE FETCH_HEAD
+ FETCH_HEAD_OR_EMPTY=foo
+ printf HERE %s\n foo
HERE foo
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8275328
Default Alt Text
raw.txt (540 B)
Attached To
Mode
P10017 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment