Page 1 of 2

Manuals and Guides

Posted: Wed Jul 13, 2011 1:47 pm
by Oscar799
Bash Programming - Introduction
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

Bash guide for beginners
http://tldp.org/LDP/Bash-Beginners-Guide/html/

Bash commands A-Z index
http://ss64.com/bash/

GNU bash manual
http://www.gnu.org/software/bash/manual/

BASH
BASH reference manual
http://www.gnu.org/software/bash/manual/bashref.html

Advanced Bash scripting Guide
http://tldp.org/LDP/abs/html/

Re: Manuals and Guides

Posted: Wed Jul 13, 2011 3:00 pm
by SimonTS
Looks like Habitual has got his wish for a basic programming section then? I'm sure he'll be a happy little bunny now, stop him getting quite so bored when everything is working properly. :mrgreen:

Re: Manuals and Guides

Posted: Wed Jul 13, 2011 3:09 pm
by MALsPa
For folks who don't mind digging through manpages, don't forget:

Code: Select all

man bash

Re: Manuals and Guides

Posted: Wed Jul 13, 2011 5:19 pm
by rich_roast
man is actually pretty versatile.

Code: Select all

man --regex
lets you sift through manpages for a given topic, which is handy if you forgot the actual command you're looking for. For example

Code: Select all

man --regex pdf
will bring up pretty much anything to do with pdf processing. See

Code: Select all

man man
for more. I admit that part of me just wanted to post a command that looks recursive.

Re: Manuals and Guides

Posted: Wed Jul 13, 2011 9:40 pm
by Habitual
rich_roast wrote:

Code: Select all

man --regex pdf
Very clever. +1

Re: Manuals and Guides

Posted: Wed Jul 13, 2011 9:50 pm
by Habitual

Re: Manuals and Guides

Posted: Thu Jul 14, 2011 1:57 pm
by samriggs
Downloaded the pdf one, wish more would put them into pdf's instead of just online manuals :(

Gives me a start anyhow :D
Sam
Thanks again for this

Re: Manuals and Guides

Posted: Thu Jul 14, 2011 3:16 pm
by rich_roast
I think doxygen can do the conversion but it's not a trivial download (subject to dependencies) so you might be better off just downloading pdf's :)

Re: Manuals and Guides

Posted: Thu Jul 14, 2011 3:38 pm
by samriggs
rich_roast wrote:I think doxygen can do the conversion but it's not a trivial download (subject to dependencies) so you might be better off just downloading pdf's :)
I got the gnu bash manual figured it might be a good place to start, plus I have to keep going on the other language I'm studying so it should be enough for now :D

I'm going to check this out anyhow because a lot of time I like some online manuals but would rather have them to read at my leasure on the desktop instead.
Thanks for this :)
Much appreciated.
Cool just check the software manager its in there .
Sam

Re: Manuals and Guides

Posted: Thu Jul 21, 2011 1:40 pm
by richyrich
/usr/share/doc/bash/ . . and the multiple sub-folders.

Re: Manuals and Guides

Posted: Sun Sep 11, 2011 11:58 am
by viking777
Here is a little bit of fun if you are interested in learning the command line:

I was going to upload a shell script here but the forum doesn't allow sh extensions so you will just have to have the contents of it instead and make your own script if you want (or run the command from the terminal if you don't).

Code: Select all

#!/bin/bash

man $(ls /bin | shuf | head -1)
I would love to say it was all my own work, but of course it wasn't, I stole it from someone else :lol:

I bet you learn something from it though. I even thought that you could use it to replace 'mintfortunes' but I am not sure I want it running every time I start a shell, so I just turned it into a script I can call when I feel like it.

Re: Manuals and Guides

Posted: Sun Sep 11, 2011 12:34 pm
by xenopeek
Cool! I've replaced the man with whatis, so I can find some interesting commands. Adding it to terminal .bashrc.

Code: Select all

whatis  $(ls /bin | shuf | head -1)
I didn't know about shuf yet...

To get a long list;

Code: Select all

ls /bin | xargs whatis

Re: Manuals and Guides

Posted: Sun Sep 11, 2011 2:40 pm
by viking777
Vincent Vermeulen wrote:Cool! I've replaced the man with whatis, so I can find some interesting commands. Adding it to terminal .bashrc.

Code: Select all

whatis  $(ls /bin | shuf | head -1)
I didn't know about shuf yet...

To get a long list;

Code: Select all

ls /bin | xargs whatis
Yes, I like that a lot, :D gives just a one or two line output that you can look at if you want to, but don't have to. Better than mint fortunes by far. It took some adapting to my fish shell I can tell you, but I got it going in the end :)

One of the obscure commands I had to use to get it to work was

Code: Select all

rev
have a look at that in the man pages. Pipe it to cut and it allows you to remove characters from the end of a file then 'rev' it again to get the original output back. (Believe me this - or something like it - is necessary in Fish because of the way it runs the 'ls' command with the -F switch permanently on). So my command looks like this:

Code: Select all

whatis (ls /bin |rev|cut -b 2-|rev| shuf | head -1)
And that has to be pasted into ~/.config/fish/config.fish - which doesn't exist so you have to create it :lol: . Still worth the trouble though, the fish shell absolutely rocks!

Re: Manuals and Guides

Posted: Mon Sep 12, 2011 2:56 pm
by xenopeek
I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*
This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:

Re: Manuals and Guides

Posted: Tue Sep 13, 2011 5:45 am
by viking777
Vincent Vermeulen wrote:I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*
This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:
I beat you I got 1731! (That is annoying actually I have only memorised 1700 of them :wink: )

How did you get the line count from the terminal output btw? The only way I could think of is to redirect the output to a file and then use

Code: Select all

wc -l

Re: Manuals and Guides

Posted: Tue Sep 13, 2011 6:29 am
by xenopeek
viking777 wrote:
Vincent Vermeulen wrote:I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*
This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:
I beat you I got 1731! (That is annoying actually I have only memorised 1700 of them :wink: )

How did you get the line count from the terminal output btw? The only way I could think of is to redirect the output to a file and then use

Code: Select all

wc -l
You don't know the pipe operator :shock: You can pipe the output of one command into the input of another with the | pipe operator, as so:

Code: Select all

whatis -s 1 -w \* | wc -l

Re: Manuals and Guides

Posted: Tue Sep 13, 2011 6:32 am
by viking777
:oops: :oops:

When I memorised that 1700th command I forgot the first :lol:

Re: Manuals and Guides

Posted: Tue Oct 11, 2011 11:58 pm
by vrkalak
Aliens BASH Tutorial > http://www.subsignal.org/doc/AliensBashTutorial.html

For me, this is the most comprehensive 'bash' tutorial - I have seen. Explains everything, in detail.

Re: Manuals and Guides

Posted: Tue Mar 06, 2012 9:51 am
by xenopeek
Tip of the week; while reading a manpage in the terminal I often find I want to try something on the terminal. No need to open another terminal, just press Ctrl+Z to move the manpage to the background and you can access your terminal again. Type "fg" to move the manpage from the background back to the foreground and continue reading 8)

Re: Manuals and Guides

Posted: Wed Oct 31, 2012 8:54 pm
by baptiste
Interesting!
I guess I could use this when viewing something with less, too.
(though most times I'm using a tabbed and maximized terminal window)

Beginners tips : pipe your impossibly long stuff into 'less' so you can sanely view it (with page up/down, etc., press 'Q' to quit).
commandwithalongoutput | less, and sometimes commandwithalongoutput | sort | less

Hit CTRL-U to clear a line of text you were typing, and especially clear a password you've typed wrong.