TiddlyWiki Tricks

Tiddly Tricks

in bash, to count the number of pipes in each line try:
cat test_table.tdl |while read line; do echo $line |sed 's/[^|]//g' |wc -c; done
where test_table.tdl is the file.

use this as a here doc dropped into less:
while read line; do echo $line |sed 's/[^|]//g' |wc -c; done << end | less -NS

while read line; do echo $line |sed 's/[^|]//g' |wc -c; done << end | less -NS

TiddlyWiki Tricks TiddlyWiki Tricks Reviewed by Chris Yarger on 10:00 Rating: 5


  1. i _love_ functions. try this one:

    count_pipes () { sed 's/[^{]//g' $* | wc -c; }

    so, this works:

    $ count_pipes test_table.tdl

    good idea. thanks for it.

    1. I will do! Keep an eye out I am currently working on version 1.02 which will have a whole slew of various features. Also within a few revisions I may add a GUI interface.

    2. It is all being worked on in this post http://www.cpyarger.com/2012/11/how-to-import-your-tiddlywiki-into.html


© 2012 cpyarger.com License: (cc) BY-NC-SA. Template images by enot-poloskun. Powered by Blogger.