Reputation
Next tag badge:
98/100 score
38/20 answers
Badges
20 153 311
Newest
 Nice Answer
Impact
~5.1m people reached

6h
answered bash loop with 0.02 increment
6h
revised How to get the Job ID?
typo
8h
comment tar command - skip symlinks
If you don't add --no-recursion, then you may end up archiving symlinks in subdirectories. I think the OP actually wants find protTests ! -type l -print0 | bsdtar --null --files-from=- --no-recursion -cf out.tar which would be the equivalent of @schily's star one. (or gtar, though I tend to prefer bsdtar/libarchive these days to be able to store as much of the file's metadata as possible).
8h
comment tar command - skip symlinks
@schily, both GNU tar and bsdtar have --files-from and --null which removes the problem with funny characters (if combined with find's -print0 or -exec printf '%s\0' {} +). But here, you'd probably want to add the --no-recursion option. Some pax implementations also have a -0 option.
10h
comment Where is the latest source code of man command for linux?
If rpm -qf or dpkg -S or the equivalent for your packaging system for `"$(command -v man)" returns the name of a package, then that method is going to be a lot more reliable than googling for strings found in the binary though. Bear in mind that most distributions patch the software from upstream. So the source package for your distribution is the only place to go for the exact source code as compiled for your /usr/bin/man.
11h
comment Why awk says “syntax error” for the comma I placed between the two patterns?
I edited based on what appears to be the original intent. I may have been wrong though. $1 ~ /^Observation/, /^@@@/ is short for $1 ~ /^Observation/, $0 ~ /^@@@/.
11h
revised Why awk says “syntax error” for the comma I placed between the two patterns?
added 6 characters in body
11h
comment Renaming a bunch of files with date modified timestamp at the end of the filename?
You should make it date -r "$f" +%Y%m%d or it won't work if POSIXLY_CORRECT is in the environment. Generally, options should go before other arguments.
11h
comment Renaming a bunch of files with date modified timestamp at the end of the filename?
@cas, if date started to read its stdin as soon as it's not a tty, that would break all scripts using date that are not run in a terminal or with their stdin redirected to something. Programs that do read their stdin, like interactive ones (think shells or rm -i) may change their behaviour when stdin is not a tty, but those that are not meant to read from stdin are not going to start doing so when they're not run in a terminal.
1d
answered Can't redirect cut output
1d
comment Can't redirect cut output
Sounds like buffering issue, run cut with stdbuf -oL cut...
1d
revised How to change all strings in python file from snake_case to camelCase in sed
added 72 characters in body
1d
revised How to change all strings in python file from snake_case to camelCase in sed
added 22 characters in body; edited tags
1d
revised How to change all strings in python file from snake_case to camelCase in sed
added 142 characters in body
1d
revised How to change all strings in python file from snake_case to camelCase in sed
added 338 characters in body
1d
answered How to change all strings in python file from snake_case to camelCase in sed
1d
comment How to change all strings in python file from snake_case to camelCase in sed
What is it you want? 'fooBarFoo' or 'FooBarFoo'?
1d
comment why is rm allowed to delete a file under ownership of a different user?
Note that to add the t bit, you need to own the directory. And if you own the directory, you can always remove files regardless of whether the t bit is set or not. If you link a file to somebody else's directory, you should be prepared for somebody else to be able to remove it. An alternative would be to first create a sub-dir of yours and add your file there instead, as the owner would not be able to remove that subdir if it's not empty.
1d
revised why is rm allowed to delete a file under ownership of a different user?
typo. Note that "sticky" bit will not prevent you from removing files in your own directories.
1d
comment Parsing a file to determine what values to use
Note that while ${var%%} and ${var#*=} are standard, ${line//\"/} is a kshism (and zsh and bash).