How to report “sed” in-place changes
When using sed to replace strings in-place, is there a way to make it report the changes it does (without relying on a diff of old and new files)?
When using sed to replace strings in-place, is there a way to make it report the changes it does (without relying on a diff of old and new files)?
I have the following data (a list of R packages parsed from a Rmarkdown file), that I want to turn into a list I can pass to R to install:
We have the unattended-upgrades package upgrading our servers with security upgrades every Monday and it works great. Today though, it upgraded all of our servers with a new version of PHP5. Because we have moved the default PHP5-FPM configuration file, apt complains that the file has been moved, and what would we like to do (Install new version, keep old version, show differences, start shell) about it. Since unattended-upgrades didn’t know how to deal with this, it just aborted and we were left with dozens of machines down until PHP5-FPM was restarted by monitoring.
To what extent can other POSIX-compatible shells function as reasonable replacements for bash? They don’t need to be true “drop-in” replacements, but close enough to work with most scripts and support the rest with some modification.
Say I have two paths: <source_path> and <target_path>. I would like my shell (zsh) to automatically find out if there is a way to represent <target_path> from <source_path> as a relative path.
So I started using zsh. I like it all right. It seems very cool and slick, and the fact that the current working directory and actual command line are on different lines is nice, but at the same time, I’m noticing that zsh can be a bit slower than bash, especially when printing text to the screen.
When a script runs, commands in it may output some text to stdout/stderr. Bash itself may also output some text. But if a few scripts are running at the same time, it is hard to identify where does an error come from. So is it possible to insert a prefix to all output of the … Read more
I’m wondering who starts unattended-upgrades in my debian-jessie:
After reading ilkkachu’s answer to this question I learned on the existence of the declare (with argument -n) shell built in.
On my Debian system I’ve customized my Gnome (Shell) keyboard shortcuts, via System Settings > Keyboard > Shortcuts.