Reputation
154,892
Next tag badge:
768/1000 score
208/200 answers
Badges
23 238 422
Newest
 Good Answer
Impact
~8.4m people reached

11h
awarded  Good Answer
22h
awarded  Nice Answer
2d
answered stdbuf supposed behavior for subprocesses
2d
comment In UNIX, how do I send a file back to it's original location after outputting it somewhere else?
~/file1 > /newlocation/filestorage doesn't move the file do a new location, it executes ~/file1 and stores its output in the new location.
2d
comment Serialize shell variable in bash or zsh
Escaping newline doesn't allow it to be preserved, it makes it go away once read. backslash-newline for read is a way to continue a logical line onto another physical line. Edit: ah I see you mention the problem with newline already.
2d
comment Serialize shell variable in bash or zsh
That solution depends on $IFS being unmodified and now fails to restore empty array elements properly. In fact, it would make more sense to use a different value of IFS, and use -d '' to avoid having to escape newline. For instance, use : as the field separator and only escape that and the backslash and use IFS=: read -ad '' array to import.
2d
comment Serialize shell variable in bash or zsh
It doesn't work if the elements contain non-printable (in the current locale) or control characters like TAB or newline as then bash and zsh render them as $'\xxx'. Try with bash -c $'printf "%q\n" "\t"' or bash -c $'printf "%q\n" "\u0378"'
Apr
29
awarded  Necromancer
Apr
28
revised how can we use multiple variables in single for loop in shell script?
added 15 characters in body
Apr
28
revised Bash print current line, line's output, and linebreak to file
added 553 characters in body
Apr
28
answered Bash print current line, line's output, and linebreak to file
Apr
28
revised how can we use multiple variables in single for loop in shell script?
added 544 characters in body
Apr
28
answered how can we use multiple variables in single for loop in shell script?
Apr
28
revised How can I search for bolded or underlined text?
added 7 characters in body
Apr
27
revised Are quotes needed for local variable assignment?
added 59 characters in body
Apr
27
revised Security implications of forgetting to quote a variable in bash/POSIX shells
avoid http links
Apr
27
comment Reading user input with read back
Note that the code would work in csh but do something different. Since csh has no read builtin, It would invoke a read command on the filesystem (which could not possibly set csh's $NAME variable), The echo "Hi $NAME!" would work if $NAME was set as an environment variable on in ~/.cshrc or anywhere else in the csh script prior to the source.
Apr
27
revised Are quotes needed for local variable assignment?
mention FreeBSD
Apr
27
comment “No space left on device” when trying to copy small folder to an external drive with alot of free space
How are you copying?
Apr
27
revised What is the setting in bash for globbing, to control whether * matches dot files
added 287 characters in body