Guys i'm new to javascript but have pulled together a PAC file based on requirements.
Problem is i'm not sure how javascript handles variables. I'm proficient with shell script, and a bit of perl.
I can't find any examples on the net of what i'm trying to do.
I want to return proxies which are set in variables depending on different conditions.
e.g
Problem is when testing using pacparser i'm just getting back a string "PROXY proxyone; PROXY proxytwo; PROXY proxythree" instead of it resolving the variables and replacing with the correct order aa.bb.cc.dd:8080.
I basically want to set a proxy order based on conditions and then just return it at the end.
Anyone any ideas?
---------- Post updated at 03:13 PM ---------- Previous update was at 12:09 PM ----------
I've fixed this with :-
But there may be a better way to do it?? I'm still not sure if need to return the string PROXY or not as i've seen it with and without in some pac examples.
Hi I am trying to write a shell script that will read 4 lines from a file and put them in variables which will be used in the script.
Can someone tell me how can I read a line and put it in a variable?
I have tried this... but this does not work.
#! /bin/sh
cat yest | while read line
do... (2 Replies)
file.txt contains
------------------
sat1 1300
#sat2 2400
sat3
sat4 500
sat5
I need to write a shell script that will output like the below
#output
sat1.ksh 1300
sat3.ksh
sat4.ksh 500
sat5.ksh
my try
------- (4 Replies)
Hi ,
I wanted to know if its possible to execute a javascript function like this
E:- function js1(){
alert ("this is js1");
}
function js2(){
alert ("this is js2");
}
function js3(){
....
execthisscript(js1);
execthisscript(js2);
}
... (1 Reply)
Hi guys,
Ok first, let me explain what I want to do. I'm making a theme for the iphone, and I found a nice wallpaper slideshow script. Here is how it knows which wallpapers to use:
<script type="text/javascript">
// SLIDE ROTATION FREQUENCY (in minutes)
var slideRotation = 0.4;... (3 Replies)
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Hello All ,
I need hello all , i need help in creating a pac file (to use in IE ). I browsed and wrote something , which is not meeting my conditions
1. in office i have to use one proxy , say PROXY1:7070 to access internet and to use client network need to add in exclusion list (advanced... (2 Replies)
Let say I have a file with variables (Test1.txt)
In Test1.txt file, it consists of
Tom is a boy
Jim is a dog
In the other scripting file (RunTest1.sh), I have
#!/bin/ksh
filename = /directory/Test1.txt
cat $filename
for i in $filename
do
print $i
done
I managed to call... (1 Reply)