Posts: 3,237
Threads: 125
Joined: Jul 2014
Reputation:
0
I had wrote previous the last chapter was #38 , the last Chapter is #36 , I was giving myself more chapters coz I need the practice lol (edited above).
Now I have begun the Chapter 29, I found some more information about it, it says it teaches "looping with while and until" in Chapter 29, and looking forward for the title, it says "Looping with For" for Chapter 23.
Also the command line found a typo in the book now, on the page 358, line 7 of the example of what a while loop is, it has printed -1e, it should be -le
I think it is the very first typo I have noticed in this book.
Posts: 1,849
Threads: 21
Joined: Sep 2015
Reputation:
0
02-20-2019, 02:02 AM
(This post was last modified: 02-20-2019, 02:05 AM by firenice03.)
Cool - Might have to look at that one too..
Quote:Maybe there can be a $DELAY and a new line of $DELAY2 where 2 has a longer duration and then edit the sleep delay on line 28 to $DELAY2 , it might work, to have two different durations allowing for the more text to read on that option, I'll try it tomorrow, as I am tired for code now.
You should be able to as long as the variable is expressed... example
DELAY1=2
DELAY2=5
Then call out each specifically within the code.. ***Looks like you tried and it worked!!
You could also use sleep, which when scripting directly from the command line works well..
Example - but substitute in any commands, I may use a variant to watch interfaces or connected HBA cards where I would repeatedly re-run a command.
Code:
while true
do date
echo " "
sleep 3
done
This will display the Date and a blank line every 3 seconds
Keep it up!!! ;D ;D
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2