0

HTML file example index.html:

<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>Application Launcher</title>
  <base href=="${slash}">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.b5d0d5828e81ec74d331.css"></head>

replace <base href="${slash}"> TO <base href=="\">

My command:

def slash= "/"
sh "sed -i  's/<base href=\".*\">/<base href=\"$slash\">/g' $file"

But it didn't work...when I tried to escape then it print $slash which I am not expecting.

if I am using <base href="/">/g then it give compilation error??

Any idea How we can achieve the below:

<base href="\">
Gaurav
  • 1
  • 2

0 Answers0