sort words separated by a coma in linux console





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 Next »
0
Date Submitted Thu. Sep. 25th, 2008 4:52 AM
Revision 1
Beginner KennethCC
Tags bash
Comments 1 comments
Small amount of bash shell code to produce terminal output. I use this to keep alive ssh connections where the server will automatically disconnect a session where input is not received for a small amount of time.
Needs: A terminal that understands ansi.sys escape codes. Most modern interactive terminals. You might have limited success on serial terminals.
CAVEAT: Admittedly

watch date

would do the same job - but is less fun.
In use I have this in a function in my .bashrc

function keepalive () {

}
1
Date Submitted Tue. Jan. 15th, 2008 7:56 AM
Revision 1
Beginner impomatic
Tags corewar | redcode | sort
Comments 0 comments
An implementation of Gnome Sort in 9 lines of Redcode. Smaller and faster than Bubble Sort. Speed increase of .5x^2-2.5x over version 1.
2
Date Submitted Mon. Jan. 7th, 2008 7:49 AM
Revision 1
Beginner impomatic
Tags corewar | redcode | sort
Comments 0 comments
An implementation of Gnome Sort in 9 lines of Redcode. Smaller and faster than Bubble Sort.
5
Date Submitted Mon. Aug. 14th, 2006 7:31 AM
Revision 1
Scripter bertheymans
Tags bash | linux | shell
Comments 1 comments
Recursively removes files or directories with a given name, using find.

I most frequently use it to remove 'CVS' or '.svn' directories from sourcepackages that still have the versioning information in them.
5
Date Submitted Fri. Jul. 20th, 2007 11:44 PM
Revision 1
Helper lavaramano
Tags arrays | bash | cli | gnu/linux
Comments 0 comments
how to handle arrays in bash
6
Date Submitted Mon. Aug. 14th, 2006 7:43 AM
Revision 1
Scripter bertheymans
Tags bash | shell | ssh
Comments 3 comments
This adds your ssh public key to the authorized_keys on a remote server. The key file in the snippet is called id_dsa.pub, yours may have another name but this is standard for DSA encryption.

To learn more about ssh I heartly recommend this: SSH tips and tricks
7
Date Submitted Thu. Sep. 21st, 2006 1:25 PM
Revision 1
Scripter bertheymans
Tags bash | fun | linux | unix
Comments 0 comments
This one-liner is great, it lists the commands you have used by popularity. At present, the 'cd' command wins in my history file with 140. Followed by ls (93) and ssh (56). What are your top 3 commands

Snippet source: ibm
7
Date Submitted Thu. Sep. 14th, 2006 1:45 PM
Revision 1
Helper dohpaz
Tags bash | Code | Comments | Grep | Sed
Comments 1 comments
I found this script online, and decided that I would modify it for my needs. As a developer, I like to know how many actual lines of code I have written--not including any comments.

It outputs in a very simple way:

Including Comments: NNN
Without Comments: NNN

One very practical, and quick, way to determine how many lines of code a project has is to pipe it through a find:


find /usr/share/php -name "*.php" -o -name "*.inc" | xargs count-code


If your code is in files of another type (i.e., .c, .h, .cpp, etc), then simply change the extensions and add more '-o -name "*.ext"' tags. If you have directories that you don't want to be counted, simple throw a "| grep -v [path/to/excluded/directory] |" inbetween the find and the xargs, and they will not be counted.
7
Date Submitted Sat. Sep. 9th, 2006 12:47 AM
Revision 1
Beginner smallshellscript
Tags bash | sh | shell
Comments 2 comments
A lot of time shell scripts need to do some sort of math. Bash's innability to do floating point arithmatic has lead to some pretty neat workarounds, often times these workarounds are slow. If you need a lot of calculations done with speed, you'll find this snippet useful
8
Date Submitted Sun. Aug. 13th, 2006 2:23 PM
Revision 1
Helper snowdonkey
Tags "array" | "images" | "javascript" "preload"
Comments 1 comments
Load images more quickly in a web page by having the browser cache them before they are requested by the user.

This script specifies the location of images that share a common folder. It can be used for multiple images and folders.

This method uses less code and is more maintanable than specifying the location of each image individually.
« Previous 1 2 Next »