Like vim scp://yourhost//your/file but in vim cmds.
Usefull tool for debug process. Show Sample Output
Paste what you previously wrote in INSERT MODE, for example: 1. Write 'foo' in INSERT MODE 2. Return to NORMAL MODE 3. Press "." and it will paste 'foo'
We have for example : func () { echo FOO echo BAR } Place the cursor under a bracket and press d + %. It will cut everything inside and the brackets. It let : func () You can copy text with y + %
List all commands present on system by folder.
PATH contains all command folder separated by ':'. With ${PATH//:/ }, we change ':' in space and create a list of folder for ls command.
Show Sample Output
If $INBACK is set, command will launch in foreground and inverse. Very useful in script ! We could apply the inverse comportement like that : eval command ${INBACK:+&}
Very useful for test a script. After launch this command, you only have to press ENTER for launch your script again. I work with screen and tape ENTER instead of '!!'+ENTER If you break your script with CTRL-C, it will wait for press ENTER and will re-launch You can write like it : while read -p "Press ENTER" ; do python ; done
It remove the square bracket and convert UNIX time to human readable time for all line of a stream (or file). Show Sample Output
Use it with cat and '|' for know what is used in a conf file. For example cat /etc/squid/squid.conf | sed -re '/^#/d ; s/#.*$// ; /^\s$/d' : Show you what you use in your file conf. It removes all comments and empty lines. Empty lines are lines with nothing, a tab, or a space.
Delete a range of line
Allow to launch nc like a daemon, in background until you still stop it. (like this command: http://www.commandlinefu.com/commands/view/9978 ) For send script or commands from the client to the server, use nc too, like that : cat script.sh | nc server 1025 echo "service openvpn restart" | nc server 1025 The loop's inside doesn't do anything, but we can add echo -e "\nCommand received\n" . Show Sample Output
Allow to launch nc like a daemon, in background until you still stop it. You can stop it with kill %1 (jobs method) or kill PID. The -k option can force nc to listen another connection, but if you use redirection, it will work only one time. The loop's inside doesn't do anything, but we can imagine to send a message to screen when a connection is established Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: