<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using a simple SED script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049917#M719093</link>
    <description>You have to pretect slash with a backslash&lt;BR /&gt;&lt;BR /&gt;example&lt;BR /&gt;echo abc | sed -e 's/^/\/tmp\//'&lt;BR /&gt;/tmp/abc&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jean-Luc</description>
    <pubDate>Fri, 15 Aug 2003 15:15:36 GMT</pubDate>
    <dc:creator>Jean-Luc Oudart</dc:creator>
    <dc:date>2003-08-15T15:15:36Z</dc:date>
    <item>
      <title>Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049916#M719092</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a file containing names of file I wish to link to a working directory.&lt;BR /&gt;&lt;BR /&gt;I wish to insert ln ./path/path2/ in front of every line of text, and then execute the file to link the files in the list to my working directory.&lt;BR /&gt;&lt;BR /&gt;How do I use a / in the field?&lt;BR /&gt;&lt;BR /&gt;I have tried the following without succes:&lt;BR /&gt;&lt;BR /&gt;sed "s/^/ln ./path1/path2//" file.tmp &amp;gt; file.lnk&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Aug 2003 15:12:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049916#M719092</guid>
      <dc:creator>Lee nino</dc:creator>
      <dc:date>2003-08-15T15:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049917#M719093</link>
      <description>You have to pretect slash with a backslash&lt;BR /&gt;&lt;BR /&gt;example&lt;BR /&gt;echo abc | sed -e 's/^/\/tmp\//'&lt;BR /&gt;/tmp/abc&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Fri, 15 Aug 2003 15:15:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049917#M719093</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-08-15T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049918#M719094</link>
      <description>You need to escape the / character with a backslash (\).&lt;BR /&gt;&lt;BR /&gt;So all /'s will look like "\/".&lt;BR /&gt;&lt;BR /&gt;HTH.</description>
      <pubDate>Fri, 15 Aug 2003 15:19:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049918#M719094</guid>
      <dc:creator>Brian Bergstrand</dc:creator>
      <dc:date>2003-08-15T15:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049919#M719095</link>
      <description>unlike addresses, which require a slash (/) &lt;BR /&gt;as a delimiter, the regular experession can be delimited by any character except a blank or a newline.  thus if the pattern contained slashes, you could choose another character, such as an exclamation mark as the delimiter&lt;BR /&gt;&lt;BR /&gt;sed 's!^!ln ./p1/p2/!'</description>
      <pubDate>Fri, 15 Aug 2003 15:22:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049919#M719095</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-08-15T15:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049920#M719096</link>
      <description>Lee,&lt;BR /&gt;  Open vi and execute the below&lt;BR /&gt;&lt;BR /&gt;:%s:^:\./path/path2/:&lt;BR /&gt;&lt;BR /&gt;  You can try the same in sed also.  Use a different seperator or escape with a backslash \ before the /.&lt;BR /&gt;&lt;BR /&gt;  Try this one&lt;BR /&gt;sed -e "s:^:ln \./path1/path2/:" file.tmp &amp;gt;file.lnk&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Aug 2003 15:25:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049920#M719096</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-08-15T15:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using a simple SED script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049921#M719097</link>
      <description>to put a "/" (slash) in your sed script you will need to escape it due to it being a special character.  to escape any character you can use a "\" (back slash)  so you would use it like so:&lt;BR /&gt;&lt;BR /&gt;cat file | sed 's/^/^\/path1\/path2\//g' &amp;gt; links.txt&lt;BR /&gt;&lt;BR /&gt;cat links.txt |&lt;BR /&gt;while read line&lt;BR /&gt;do&lt;BR /&gt;ln -s $line .&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Aug 2003 16:32:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-a-simple-sed-script/m-p/3049921#M719097</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-08-15T16:32:56Z</dc:date>
    </item>
  </channel>
</rss>

