Linux Basic Batch file scripting help


ReVo_007

#techie
Section Mod
Guys I have an ISP using cyberroam client so I have made a .sh for login and logout ..but I wast to create a script which will re login so that IP changes ... The problem is that am not able to fine a function to delay the calls in between .

I have this file

LOGIN.sh

"

cd Desktop

./crclient -u <username>

"

LOGOUT.sh

"

cd Desktop

./crclient -l

"

So is there a way I can use them both in a new .sh or any other executable file after 10-20secs say... And am using this on Jdownloader <- If this info helps :/
 

..:: Free Radical ::..

Well-Known Member
Adept
you can ping a null address a certain number of times

eg. on windows,

Code:
@ping 127.0.0.1 -n 2 -w 1000 > nul

@ping 127.0.0.1 -n %1% -w 1000 > nul
 

ReVo_007

#techie
Section Mod
does this work on linux ? If yes how does it work can you tell me the command

--- Updated Post - Automerged ---

#!/bin/bash

/home/$user/Desktop/crclient -l

sleep 10s

/home/$user/Desktop/crclient -u <username>

This is what I got as answer at linux mint forum and it worked like a charm :) .
 

ReVo_007

#techie
Section Mod
Windows also has something like this I dont remember now but had used it while I was experimenting with creating automated setups for customized XP :) .
 

Top