Skip to content

Tag: while-loop

Linux – auto restarting with sleep

Current code of mine is I don’t have access to a linux box right now and only way to do my request will be made on the live server and I don’t want to test and jeopardize something, so I would be happy if I could get some help Is this the way it should be if I want my

How to know when dd has finished

I have a issue with the dd comand. I use it in a while like this: And it works like charm, the only problem is that once the file is read completely, it doesnt stop the while, it stays there stalled. How could I make the while to stop once the dd read all the file? BTW: Note my machine

Save all data into variable tcl

I have a code which i want to use to open a log file, extract the contents and save it into a variable so i can extract the data from the variable in the future. How do i do that? So far the code saves only the last data of the log file into the variable. I think the while

While loop not equal command not found

I am trying to perform a simple while loop comparing a variable to a string. It fails to load with the error on this line. Error states [: missing `]’ and : command not found. My while loop looks like; Answer There are a couple of errors: See that variable declaration do need to be like var=value. Other…