I have the below script to iterate the the properties file and invoke a another job through REST API call.
!/bin/bash
IFS=$'\n'
for file in `ls -1 *.config`; do
for val in `cat $file`;do
url+="\&"${val}
done
url=${url// /"%20"}
url=""
sleep 1
done
This script when executes throws some garbage like below and doesn't work.
!DOCTYPE html><html><head>
<title>Jenkins</title><link rel="stylesheet" type="text/css" href="/static/d27551cd/css/style.css" /><link rel="stylesheet" type="text/css" href="/static/d27551cd/css/color.css" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/static/d27551cd/favicon.ico" /><script>var isRunAsTest=false; var rootURL=""; var resURL="/static/d27551cd";</script><script src="/static/d27551cd/scripts/prototype.js" type="text/javascript"></script><script src="/static/d27551cd/scripts/b
But the line I am echoing, If i copy paste the line from console and execute in the command line, it works just fine and triggers the job.
Can anyone give me any pointer about what is happening here ?
Thanks,
Maneesh