Hot answers tagged shell-script
Obligatory awk answer: echo "12345" | awk '$1=$1' FS= OFS="." Output is: 188.8.131.52.5 Answer is modified from one of the solutions in this Stack Overflow post.
To execute a script you should make it executable. chmod u+x /home/joey/hello.sh after you can execute with ./hello.sh # if you are in the same directory ~/hello.sh # if you are in another directory hello.sh # if you put in a directory included in the $PATH with echo $PATH you can see all the directory included in your path, chose ...
drop it in /usr/bin and set the execute permission for everyone. Then you should be able to call it regardless of your current working path. Note that this works because /usr/bin is listed in your environment PATH. sudo cp ~/hello.sh /usr/bin sudo chmod o+x /usr/bin/hello.sh
The problem you are experiencing is related to the syntax of your mv command. If you forget for a minute you are trying to work with date files, your command is equivalent to: mv file.a file.b file.c file.d In this case, its not clear which file should be renamed what. A solution to the problem may be to use a command to iterate through each file and ...
Perl regex (with lookups and backreferences) answer to replace everything by everything-plus-a-dot except for the last one (assuming that's what the question was): $ echo "12345" | perl -wlpe 's/(.(?=.))/$1\./g' 184.108.40.206.5
The shortcuts for KDE use to be located in kdeglobals, but at some point in the past they changed location. I have now found them in $HOME/.kde/share/config/kglobalshortcutsrc It is a file with many different sections, I will show just one: [plasma-desktop] Next Activity=Meta+Tab,Meta+Tab,Next Activity Previous ...
Only top voted, non community-wiki answers of a minimum length are eligible