As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label CLI. Show all posts

I used to run the following commands to find out if a command exists (besides using Bash auto-completion if it's executable in PATH) and what kind of the command is:

$ type which
which is /usr/bin/which
$ file /usr/bin/which
/usr/bin/which: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

And I am not kidding you, I manually typed /usr/bin/which in the second command to find out the file type. file requires a full path. I feel little embarrassed. :) But, it's nothing wrong with it.

However, the better ways can be:

$ file `type -p which`
$ file `which which`

Note that type is a Bash shell builtin command (can differ from your environment), which is a normal program. You can also use locate for file'd a list of matched files if you only have partial filename. All three commands can accept a number of filenames.



I have just been using Wakoopa 1.1.1 on Linux. It works very well. I have wanted to try it when it was not ready for Linux. I do know how long it has started supporting Linux, it surely does it great because it also have a 64-bit client. The packages only are for DEB and RPM package managements, but the binary tarball is easy to use.



The only problem I have is it is not able to detect the CLI/TUI programs, simply because it has no easy way to determine which CLI/TUI program you are currently using. As in X, we have many different terminal emulator, then few terminal window managers. It is nearly impossible that you could tell which is running by a code. We also still have virtual consoles, but this probably not the case to talk because Wakoopa is a GUI program. Not many people will use X and switch to virtual console to work.



The web tracking works normally with Firefox 3.5.5. But I am not satisfied with it, it uses CrunchBase as the website database. But as I checked up on CrunchBase, it is really a company-oriented. I don't see gnu.org or kernel.org in it.



I may be using Wakoopa for a little longer. It really couldn't fully reflect my use on computer. I stay a lot of time in terminal. I know I can use gvim instead of vim, but I rather not to. I think Wakoopa is better for Windows and OS X users, because the normal users of theirs are stuck to GUI programs.

I read this Howto about WordGrinder. I give it a try, it's easy to compile, just need a little change. You will need:





yum install gcc ncurses-devel lua-devel lua-filesystem


Then run ./pm install to install, I got an error from linker:



gcc "-Wall" "--std=c99" "-Os" "-s"  -o ".pm-cache/34-1-utils" ".pm-cache/1-utils.o" ".pm-cache/2-main.o" ".pm-cache/3-lua.o" ".pm-cache/4-word.o" ".pm-cache/5-bit.o" ".pm-cache/6-screen.o" ".pm-cache/32-31-7-

_prologue.o" ".pm-cache/33-dpy.o" "-lm" "-lncursesw" "-llua5.1"

/usr/bin/ld: cannot find -llua5.1


I do install lua, but the name isn't right for Fedora. So, I opened the pmfile for "lua5.1", it's at line 215 in the version 0.3.2. I changed it to "lua". Now, I have WordGrinder.



But there is a problem, I couldn't make text italic or underlined, maybe I don't know how to use that? Anyway, here is a screenshot of what I get from WordGrinder and exported HTML result:





By the way, it also provides binary package for Windows users!



Updated: I got it! RTFM! wordgrinder README.wg. You can press CTRL+SPACE to enter selecting mode, then press CTRL+I to italicize the text.