208,101 reputation
25286575
bio website stackexchange.com/users/…
location
age
visits member for 3 years, 11 months
seen 30 mins ago

Moderator♦ pro tempore on French Language, Computer Science and Software Recommendations. I'm also a unix amateur, and a developer with a computer science background and security leanings by trade.

Interested in embedded systems? Join the Embedded Programming and Design proposal!

Programmeurs francophones : participez à Stack Overflow en français.

Avatar picture slightly adapted from a photo by Luridiformis (Zonda Grattus).


1h
comment How can I test if a variable is empty or contains only spaces?
@Zack [[:charclass:]] is POSIX, but not supported by , and risky because it's locale-dependent. *[$IFS]* would work in any shell, why do you think it would be unreliable?
1h
revised Chrome loses Compose sequences whose last character uses Shift
fix ' replaced by ` and some inapplicable formatting
2h
comment List files of certain type under a dir?
@Tim Pattern matching is performed by the shell. When a pattern ends in a /, the shell only selects directories (including symlinks to directories). Run echo */ to see for yourself that this is unrelated to ls. The character / separates pathname components, or to put it in English, is a directory separator. The consequences of including a / character depend on exactly where it is; at the end of a shell pattern, it means “match directories only”.
9h
comment How can I test if a variable is empty or contains only spaces?
I gave spaces as an example in my answer because that's what the question asked for. It's equally easy to test for whitespace characters: case $param in *[![:space:]]*) …. If you want to test for IFS characters, you can use the pattern *[$IFS]*.
9h
comment filename and pathname of a file
@Gnouc You stated that “they use filename and pathname interchangeable”, which is not at all the case. Any filename is also a pathname, but the converse is not true.
9h
answered waiting for network in a bash script
9h
comment filename and pathname of a file
@Gnouc tim.pdf is a pathname. Any filename is a pathname.
9h
answered List files of certain type under a dir?
9h
answered Is Android compatible with the Linux Standard Base?
9h
revised sed wiki description
added 129 characters in body
9h
revised Search and replace string literal with sed
edited tags
9h
answered filename and pathname of a file
9h
answered Is `-` used only with cd?
10h
comment How can I test if a variable is empty or contains only spaces?
That's a bit convoluted. The usual portable way to test whether a string contains certain characters is with case.
10h
answered How can I test if a variable is empty or contains only spaces?
10h
revised Interactive command usage reference: do you generally have that on Unix?
edited tags
10h
answered Interactive command usage reference: do you generally have that on Unix?
10h
asked Chrome loses Compose sequences whose last character uses Shift
10h
revised emacs org-mode clocktable - clock-in clock-out columns
edited tags
11h
revised Secure the content of a hard disk
typos