Em Andamento

write shell script

#!/bin/sh

# cd to fbshop-casperjs directory

cd $(dirname $0)/..

casperjs src/shop/crawl/[url removed, login to view] $*

exit $?

I have script above. some worker call that script continuously 24H.

I would like to modify like below. I don't know how to control value and if condition in shell script.

$i should be stored somewhere outside to increase the value for every independent excution of .sh script.

Environment of this script on Ubuntu 14.X.X

#!/bin/sh

# cd to fbshop-casperjs directory

cd $(dirname $0)/..

if($i is not exist){

$i=0

}

if($i == 200){

$i=0

}

if($* contain "[url removed, login to view]"){

if($i <100){

casperjs src/shop/crawl/[url removed, login to view] $*

}

else{

casperjs --ignore-ssl-errors=true src/shop/crawl/[url removed, login to view] $*

}

$i=$i+1

}

else{

casperjs --ignore-ssl-errors=true src/shop/crawl/[url removed, login to view] $*

}

exit $?

Habilidades: Linux, Shell Script, Arquitetura de software

Ver mais: shell script compare write, shell script update write log file results, check file script shell, control know creator, script logger write syslog, php script read write xml, express script shell, script shell delete line file, linux script shell replace string, script shell gsm modem, linux script shell gsm modem, write condition month sql server 2000, add lines script shell, script shell, type script used write browser based games

Acerca do Empregador:
( 15 comentários ) 관악구, Korea, Republic of

ID do Projeto: #11911099

Premiar a:

rootatlocalhost

Hello, it is basic script, I'd like to write it for you. I'm going to store $i value in external file, placed in the same directory, where script is placed. I'll test script on my test machine and then provide you t Mais

$10 USD em 0 dias
(4 Avaliações)
2.2

7 freelancers are bidding on average $25 for this job

AVKor

Hello, I am an expert in Linux (18 years of experience; Debian, Ubuntu, CentOS and many others) and shell scripting. I'm ready to start working on your project.

$30 USD in 3 dias
(11 Comentários)
3.3
SynonymTech

Hello there, i apply your project that means i am 100% confident to do your project on time within your best budget. Thanks, tanoy

$30 USD in 0 dias
(1 Comentário)
1.0
marekmosna

Hi man so the script should change working directory store the i variable for further runs and if the directory contain [url removed, login to view] call 100 times casperjs without extra parameter otherwise with parameter.

$25 USD em 1 dia
(1 Comentário)
1.0
ranjanamishra990

A proposal has not yet been provided

$25 USD em 1 dia
(0 Comentários)
0.0
hmasudi60

I have solution to this right now and it can be done just right away. I have scripts of examples that i can send you.

$30 USD em 1 dia
(0 Comentários)
0.0
xmls

Highly interested with your project and im ready to start right now. My completion rate is always 100% and I only bite what I can chew. knock me please

$100 USD em 1 dia
(17 Comentários)
0.0
vw66bus

Support the American worker by not offshoring this work! I can have this done in a few hours as I fully understand the project requirements. Naturally, I have a few questions which we can address once the bid is accep Mais

$30 USD em 1 dia
(0 Comentários)
0.0
Luongpt2

I will complete your requirement for 1 day

$20 USD em 1 dia
(0 Comentários)
0.0
GrAlex

Hello! My name is Alex and I'm Linux Administrator since 2005. I am pleased to welcome you. I offer technical support for web hosting companies and individuals, Directadmin installation and optimization. Outsourced sol Mais

$35 USD em 1 dia
(0 Comentários)
0.0