LINUX LITE 7.4 RC1 RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux Shell Scripting Cookbook
#1
I heard about this book kindly from [member=7109]Moltke[/member]

Thread for everyone to discuss bash learning from this book.

Reply
#2
#2 on the same page

I used a lot of time and tried all kind of things for the increment exercise. Including all from Stack Exchange and AskUbuntu on questions about increments, not specifically this book or exercise.

Code:
let no1++

Eventually I tried changing the final line to

Code:
echo $no1

Rather than as I was using which was

Code:
echo $result

From earlier in #2 section.
Felt a bit silly but was glad I got there in the end.

Hope it saves someone some time in making the same mistake as I had.
Reply
#3

Quote:I found 1 error to date,  page 37 of 384, #3 on the page.

[member=411]bitsnpcs[/member] I can't find that example on page 37. Are you sure it's the correct page? What's the lesson title/about?
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#4
(09-17-2018, 02:31 AM)Moltke link Wrote:
Quote:I found 1 error to date,  page 37 of 384, #3 on the page.

[member=411]bitsnpcs[/member] I can't find that example on page 37. Are you sure it's the correct page? What's the lesson title/about?

Page number on the actual book says Page 20 (of the chapter 1), page number for the entire book in the pdf reader says page 37 of 384.

It is in the Title "Math with the Shell", under #3

[Image: Screenshot_2018_09_17_03_39_27.png]
Reply
#5
[member=411]bitsnpcs[/member] and everyone else interested, here's the book's link https://gutl.jovenclub.cu/wp-content/upl...okbook.pdf
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#6
[member=7109]Moltke[/member]  Thank You Smile
Reply
#7
Is your page the same ?
Lets hope I don't have the special edition.
Reply
#8
Quote:Is your page the same ?


Yes, it is [member=411]bitsnpcs[/member]  Btw, I tried the example and it gave me an error just like you said, but copying/pasting right from the book into the terminal does work. Check it out

[Image: 2h6d1xu.jpg]

I don't know why but it worked, so I guess that rather than being an error in the book there's something we're not doing or we're doing it wrong.

EDIT: I just found out what the problem was: we were using the " ' " symbol rather than " ` " as in the example. I noticed after running it again using the up arrow, since I copied/pasted the whole thing, I thought it should work that way and it did Smile so it's no an error from the book. Thank you for this great idea about creating a thread for the books. Smile
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#9
This is the result when using the ` instead of the '

[Image: 1a.png]

This is the result not using ` or ' as per my playing with it, (the second running of the file in the terminal, the first is from the above version), the result it is how the book says it should look.


[Image: 1b.png]

[member=7109]Moltke[/member] you are correct, Copying/Pasting from the book or typing it in to the command line does produce 81.0.
It just fails when used as a script that is a file and I am still not sure why that is.

I will edit my earlier post about there being an error in the book.

I'll give this book a miss, I'll stick with the books at home for now.
I may try this book again once I have more experience and can follow it better.

I may even need the book [member=7701]kpanic[/member] described to me "And a child can learn it (with the time they use inall those 'social media' sites)."
I can understand that eg; when learning a new language it is often that you use childrens books in the new language for the first books you read.
Reply
#10
[member=411]bitsnpcs[/member]  in the first image you get an error because there cannot be spaces between "result=`echo" you wrote "result= `echo" and that's why it didn't work. The whole thing should look like this, with no spaces between " =` " in order to work as it is supposed to:
Code:
$ result=`echo "$no * 1.5" | bc`
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)