99,849 reputation
12117248
bio website
location European Union
age
visits member for 2 years, 5 months
seen 33 mins ago

Dec
9
comment Command that prints file contents given filename on stdin
That assumes the file name doesn't contain space, tab, single quote, double quote or backslash characters though (and newline, but your usage of cut already seems to imply that) (and other blank characters in your locale with some xargs implementations). With GNU xargs, you can use xargs -rd '\n' cat to assume a newline delimited list of files.
Dec
9
comment Finding the maximum of the values in a file
That assumes the input has only one line.
Dec
9
revised Finding the maximum of the values in a file
`-o` is a GNU extension, POSIX -> head -n 1, [0-9]* also matches the empty string.
Dec
9
comment vim :grep using the bash 'globstar' option
:set shell=/bin/zsh or :set shell=/bin/bash\ -O\ globstar, or :let $BASHOPTS="globstar"
Dec
9
comment Print numbers from 1-50
@mikerserv, see this as referenced in the question that spun off that comment
Dec
8
comment How to collect disk read/write activity over a given period of time?
iotop -a?​​​​
Dec
8
answered repeat a line, splitting one field
Dec
8
revised Security Implications of using unsanitized data in Shell Arithmetic evaluation
deleted 17 characters in body
Dec
8
reviewed Edit Why do I need a tty to run sudo if I can sudo without a password?
Dec
8
revised Why do I need a tty to run sudo if I can sudo without a password?
Spell Red Hat correctly, fix ambiguities
Dec
8
revised Security Implications of using unsanitized data in Shell Arithmetic evaluation
added 370 characters in body
Dec
8
revised Security Implications of using unsanitized data in Shell Arithmetic evaluation
more accurate qualification of the context in the question title.
Dec
8
revised Security Implications of using unsanitized data in Shell Arithmetic evaluation
added 370 characters in body
Dec
8
revised Security Implications of using unsanitized data in Shell Arithmetic evaluation
added 14 characters in body
Dec
8
answered Security Implications of using unsanitized data in Shell Arithmetic evaluation
Dec
8
reviewed Leave Open Deleting files older than a month
Dec
8
reviewed Leave Open Print numbers from 1-50
Dec
8
comment Print numbers from 1-50
@muru, to many people, yes, it does. And my comment was not addressed to the OP (and besides is just general information on the benefit of either in the general case).
Dec
8
comment Print numbers from 1-50
@garethTheRed, $((x + 1)) would not work with some old versions of ash based shells, and is currently not clearly specified by POSIX (under discussion there) but would work in most shells nowadays. $(($x + 1)) is clearly specified but $((1-$x)) for instance has issues that $((1-x)) (or x=$((1-($x)))) don't have. x=$((x + 1)) is safe in modern versions of ash based shells even if x doesn't contain a number. Both have security implications in most other shells.
Dec
8
answered Print numbers from 1-50