<?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: replace a string with &amp;quot;/&amp;quot; in a variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792519#M641322</link>
    <description>&amp;gt;I have more filesystems like /home1, /home2 then:&lt;BR /&gt;&amp;gt;exact match for "/home", right?&lt;BR /&gt;&amp;gt;... | awk -v FSYS=/home '$NF==FSYS&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;matches all filesystems&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ FSYS&lt;BR /&gt;&lt;BR /&gt;Yes, those /home* ones.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I can use "~" with ERE like FSYS[0-9]&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ FSYS[0-9] &lt;BR /&gt;&lt;BR /&gt;Not like that.  Either:&lt;BR /&gt;... | awk -v FSYS='/home[0-9]' '$NF ~ FSYS&lt;BR /&gt;Or:&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ (FSYS "[0-9]")&lt;BR /&gt;&lt;BR /&gt;&amp;gt;when I have to search in a file where FS is &lt;TAB&gt; or &lt;BLANK&gt; then I use following command:&lt;BR /&gt;awk -v text=search 'BEGIN { FS = "[ \t]*|[ \t]+" }&lt;BR /&gt;$NF ~ search {print $NF}' /tmp/text&lt;BR /&gt;&lt;BR /&gt;Don't do that.  The default is already tab or blank but ignoring leading tab/blanks.&lt;BR /&gt;(Not sure why you are using both "*" and "+" in your ERE?  Only "+" should be used for one or more.)&lt;BR /&gt;And you could use -F on the command line to set FS.&lt;/BLANK&gt;&lt;/TAB&gt;</description>
    <pubDate>Mon, 30 May 2011 12:11:16 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2011-05-30T12:11:16Z</dc:date>
    <item>
      <title>replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792511#M641314</link>
      <description>hello,&lt;BR /&gt;&lt;BR /&gt;i use often sed to replace a string, but&lt;BR /&gt;here it is not a good way, other options ?&lt;BR /&gt;&lt;BR /&gt;what's the best way to replace a string with "/"&lt;BR /&gt;&lt;BR /&gt;input for example: /dev/vgold_fs/config&lt;BR /&gt;new output       : /dev/vgneu&lt;BR /&gt;&lt;BR /&gt;it work's good with &lt;BR /&gt;echo /dev/vgold_fs/config |sed "sX/dev/vgold_fs/configX/dev/vgneuXg"&lt;BR /&gt;&lt;BR /&gt;But when you have a X in the string, then you get with:&lt;BR /&gt;&lt;BR /&gt;echo "/dev/vgold_fs/configX" | sed "sX/dev/vgold_fsX/dev/vgneuXg"&lt;BR /&gt;&lt;BR /&gt;sed: Function sX/dev/vgold_fs/configXXX/dev/vgneuXg cannot be parsed.&lt;BR /&gt;&lt;BR /&gt;i have to prepare the input string like&lt;BR /&gt;"\\\\\/dev/vgold_fs/configX" ?&lt;BR /&gt;&lt;BR /&gt;not so good &lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 May 2011 14:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792511#M641314</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2011-05-26T14:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792512#M641315</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Change your delimiters:&lt;BR /&gt;&lt;BR /&gt;# X=/dev/vgold_fs/config&lt;BR /&gt;# echo $X|sed -e 's|/dev/vgold_fs/config|/dev/vgneu|'&lt;BR /&gt;/dev/vgneu&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 26 May 2011 14:33:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792512#M641315</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-05-26T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792513#M641316</link>
      <description>great, great.&lt;BR /&gt;&lt;BR /&gt;maybe you have also an improvement for "awk" and escape-ing like this:&lt;BR /&gt;&lt;BR /&gt;it is only an example (but used for parse commands like "bdf", "lvdisplay" )&lt;BR /&gt;&lt;BR /&gt; OK (because i escape )&lt;BR /&gt;&lt;BR /&gt;X="/dev/vgold_fs/config"                                                     &lt;BR /&gt; X_AWK=$( echo ${X} | sed "s|/|\\\\\/|g" )        &lt;BR /&gt; echo "/dev/vgold_fs/config  feld2 feld3" | awk '$1 ~ /^'${X_AWK}'$/ {print $1}'                &lt;BR /&gt;/dev/vgold_fs/config&lt;BR /&gt;&lt;BR /&gt; NOT-OK:&lt;BR /&gt;&lt;BR /&gt; X="/dev/vgold_fs/config"&lt;BR /&gt; echo "/dev/vgold_fs/config feld2 feld3" | awk '$1 ~ /^'${X}'$/ {print $1}'&lt;BR /&gt;&lt;BR /&gt; syntax error The source line is 1.&lt;BR /&gt; The error context is&lt;BR /&gt; $1 ~ /^/dev/vgold_fs/config$/ {print &amp;gt;&amp;gt;&amp;gt;  $1} &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt; awk: Quitting&lt;BR /&gt; The source line is 1.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2011 07:00:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792513#M641316</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2011-05-27T07:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792514#M641317</link>
      <description>&lt;!--!*#--&gt;&amp;gt;maybe you have also an improvement for "awk" and escape-ing like this:&lt;BR /&gt;&lt;BR /&gt;What are you really trying to do?  It seems you are looking for an exact match for the first field.  Why not:&lt;BR /&gt;echo "/dev/vgold_fs/config feld2 feld3" |&lt;BR /&gt;   awk -v select="$X" '$1 == select {print $1}'&lt;BR /&gt;&lt;BR /&gt;&amp;gt;X_AWK=$( echo ${X} | sed "s|/|\\\\\/|g" ) &lt;BR /&gt;&lt;BR /&gt;Better to use single quotes and then the number of "\"s are predictable:&lt;BR /&gt;X_AWK=$( echo "${X}" | sed -e 's|/|\\/|g' )&lt;BR /&gt;&lt;BR /&gt;&amp;gt;echo "/dev/vgold_fs/config feld2 feld3" | awk '$1 ~ /^'${X_AWK}'$/ {print $1}' &lt;BR /&gt;&lt;BR /&gt;If you really want a pattern match, better go with variables than constant regular expression that has "//":&lt;BR /&gt;echo "/dev/vgold_fs/config feld2 feld3" |&lt;BR /&gt;   awk -v pat="$X" '$1 ~ ("^" pat "$") {print $1}'&lt;BR /&gt;&lt;BR /&gt;(The "^" and "$" anchors could be included in the original $X.)</description>
      <pubDate>Fri, 27 May 2011 08:09:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792514#M641317</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-05-27T08:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792515#M641318</link>
      <description>&amp;gt;What are you really trying to do?  It seems you are looking for an exact match for the &amp;gt; first field.  Why not:&lt;BR /&gt;&lt;BR /&gt;if want to search with a shell variable , which include "/" or "\" with "awk" in field 1 for example.&lt;BR /&gt;&lt;BR /&gt;example: fs=/tmp&lt;BR /&gt;&lt;BR /&gt;then i want search for "${fs}" with command "bdf" and work with "awk"&lt;BR /&gt;&lt;BR /&gt;like:&lt;BR /&gt;bdf | awk "$NF ~ ... { print .... &lt;BR /&gt;&lt;BR /&gt;regards.&lt;BR /&gt;&lt;BR /&gt;sorry, i explain it not very good :-((</description>
      <pubDate>Fri, 27 May 2011 11:28:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792515#M641318</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2011-05-27T11:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792516#M641319</link>
      <description>&amp;gt;if want to search with a shell variable, which include "/" or "\" with "awk" in field 1 for example.&lt;BR /&gt;&lt;BR /&gt;I as asking if you wanted an exact match (first example: ==) by a pattern match (ERE) (the last example: ~).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;then I want search for "${fs}" with command "bdf" and work with "awk"&lt;BR /&gt;&lt;BR /&gt;awk "$NF ~ ... &lt;BR /&gt;&lt;BR /&gt;It is much easier to put the pattern in a variable.  Then you don't have to worry about the "/" delimiters.&lt;BR /&gt;&lt;BR /&gt;You can also use the match function.</description>
      <pubDate>Fri, 27 May 2011 11:51:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792516#M641319</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-05-27T11:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792517#M641320</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; if want to search with a shell variable , which include "/" or "\" with "awk" in field 1 for example.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; example: fs=/tmp&lt;BR /&gt;&lt;BR /&gt;First, I would avoid the temptation to use a variable name, that if upper-cased would become an 'awk' reserved variable name -- FS.&lt;BR /&gt;&lt;BR /&gt;Consider these two ways of matching:&lt;BR /&gt;&lt;BR /&gt;# |awk -v FSYS=/ho '$NF~FSYS'&lt;BR /&gt;/home&lt;BR /&gt;&lt;BR /&gt;...which is probably *not* what you want.&lt;BR /&gt;&lt;BR /&gt;# bdf | awk -v FSYS=/ho '$NF==FSYS {print $NF}'&lt;BR /&gt;&lt;BR /&gt;...returns nothing since the comparison for equality fails.&lt;BR /&gt;&lt;BR /&gt;# bdf | awk -v FSYS=/home '$NF==FSYS {print $NF}'&lt;BR /&gt;/home&lt;BR /&gt;&lt;BR /&gt;...which is what you appear to want.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;....JRF...&lt;BR /&gt;&lt;BR /&gt;...and:&lt;BR /&gt;&lt;BR /&gt;# bdf | &lt;BR /&gt;~/Sandbox jrf $ df -h | awk -v FSYS=/home '$NF==FSYS'&lt;BR /&gt;map auto_home     0Bi    0Bi    0Bi   100%    /home&lt;BR /&gt;~/Sandbox jrf $ df -h | awk -v FSYS=/ho '$NF==FSYS'&lt;BR /&gt;~/Sandbox jrf $ &lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2011 12:17:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792517#M641320</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-05-27T12:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792518#M641321</link>
      <description>for a example,&lt;BR /&gt;i have more filesystems like /home1, /home2&lt;BR /&gt;then :&lt;BR /&gt;&lt;BR /&gt;exact match for "/home" , right ?&lt;BR /&gt;bdf | awk -v FSYS=/home '$NF==FSYS {print $NF}'&lt;BR /&gt;matches all filesystems &lt;BR /&gt;bdf | awk -v FSYS=/home '$NF ~ FSYS {print $NF}'&lt;BR /&gt;&lt;BR /&gt;i can use "~" with ERE like FSYS[0-9]&lt;BR /&gt;bdf | awk -v FSYS=/home '$NF ~ FSYS[0-9] {print $NF}'&lt;BR /&gt;&lt;BR /&gt;in another usage, when i have to search in a file where&lt;BR /&gt;FS is &lt;TAB&gt; or &lt;BLANK&gt; then i use following command:&lt;BR /&gt;&lt;BR /&gt;awk -v text=search ' BEGIN { FS = "[ \t]*|[ \t]+" } &lt;BR /&gt;                             $NF ~ search {print $NF}' /tmp/text&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLANK&gt;&lt;/TAB&gt;</description>
      <pubDate>Mon, 30 May 2011 06:21:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792518#M641321</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2011-05-30T06:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792519#M641322</link>
      <description>&amp;gt;I have more filesystems like /home1, /home2 then:&lt;BR /&gt;&amp;gt;exact match for "/home", right?&lt;BR /&gt;&amp;gt;... | awk -v FSYS=/home '$NF==FSYS&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;matches all filesystems&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ FSYS&lt;BR /&gt;&lt;BR /&gt;Yes, those /home* ones.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I can use "~" with ERE like FSYS[0-9]&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ FSYS[0-9] &lt;BR /&gt;&lt;BR /&gt;Not like that.  Either:&lt;BR /&gt;... | awk -v FSYS='/home[0-9]' '$NF ~ FSYS&lt;BR /&gt;Or:&lt;BR /&gt;... | awk -v FSYS=/home '$NF ~ (FSYS "[0-9]")&lt;BR /&gt;&lt;BR /&gt;&amp;gt;when I have to search in a file where FS is &lt;TAB&gt; or &lt;BLANK&gt; then I use following command:&lt;BR /&gt;awk -v text=search 'BEGIN { FS = "[ \t]*|[ \t]+" }&lt;BR /&gt;$NF ~ search {print $NF}' /tmp/text&lt;BR /&gt;&lt;BR /&gt;Don't do that.  The default is already tab or blank but ignoring leading tab/blanks.&lt;BR /&gt;(Not sure why you are using both "*" and "+" in your ERE?  Only "+" should be used for one or more.)&lt;BR /&gt;And you could use -F on the command line to set FS.&lt;/BLANK&gt;&lt;/TAB&gt;</description>
      <pubDate>Mon, 30 May 2011 12:11:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792519#M641322</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-05-30T12:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792520#M641323</link>
      <description>&lt;!--!*#--&gt;great, great, great.&lt;BR /&gt;&lt;BR /&gt;one more example:&lt;BR /&gt;i have more filesystems like /home1, /home2, /home33&lt;BR /&gt;&lt;BR /&gt;then i match /home1, /home2 like:&lt;BR /&gt;... awk -v FSYS="/home[0-9]$" '$NF ~ FSYS { print $0 }' &lt;BR /&gt;or&lt;BR /&gt;... awk -v FSYS=/home '$NF ~ (FSYS"[0-9]""$") { print $0 }' &lt;BR /&gt;/dev/vg00/lvol4               1048576     757648     288720   72% /home1&lt;BR /&gt;/dev/vg00/lvol4               1048576     757648     288720   72% /home2&lt;BR /&gt;&lt;BR /&gt;then i match /home1, /home2, /home33 like:&lt;BR /&gt;... awk -v FSYS="/home[0-9]+$" '$NF ~ FSYS { print $0 }' &lt;BR /&gt;or&lt;BR /&gt;....awk -v FSYS=/home '$NF ~ (FSYS"[0-9]+""$") { print $0 }' &lt;BR /&gt;/dev/vg00/lvol4               1048576     757648     288720   72% /home1&lt;BR /&gt;/dev/vg00/lvol4               1048576     757648     288720   72% /home2&lt;BR /&gt;/dev/vg00/lvol4               1048576     757648     288720   72% /home33&lt;BR /&gt;&lt;BR /&gt;OK , my syntax ? it works, like i want and you show me :-)</description>
      <pubDate>Tue, 31 May 2011 05:55:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792520#M641323</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2011-05-31T05:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792521#M641324</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; i have more filesystems like /home1, /home2, /home33&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ... awk -v FSYS="/home[0-9]$" '$NF ~ FSYS { print $0 }'&lt;BR /&gt;&lt;BR /&gt;This prevents you from matching things like '/home11'.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ... awk -v FSYS=/home '$NF ~ (FSYS"[0-9]""$") { print $0 }'&lt;BR /&gt;&lt;BR /&gt;This is uselessly cluttered.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ... awk -v FSYS="/home[0-9]+$" '$NF ~ FSYS { print $0 }'&lt;BR /&gt;&lt;BR /&gt;This is fine.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ....awk -v FSYS=/home '$NF ~ (FSYS"[0-9]+""$") { print $0 }'&lt;BR /&gt;&lt;BR /&gt;Again, this is cluttered with extraneous double quotes.  Though it will match the FSYS variable with one or more digits before the end.&lt;BR /&gt;&lt;BR /&gt;When you can, compare for equality as opposed to matching a regular expression.  The former will be faster.  This is why I suggested:&lt;BR /&gt;&lt;BR /&gt;# bdf | awk -v FSYS=/home '$NF==FSYS {print $NF}'&lt;BR /&gt;&lt;BR /&gt;ALSO:&lt;BR /&gt;&lt;BR /&gt;# ...awk -v FSYS="/home[0-9]+$" '$NF ~ FSYS { print $0 }' &lt;BR /&gt;&lt;BR /&gt;... *may* match what you want and it may *not*.  Consider:&lt;BR /&gt;&lt;BR /&gt;# echo "/Users/home11"| awk -v FSYS="/home[0-9]+$" '$NF ~ FSYS { print $0 }' &lt;BR /&gt;/Users/home11&lt;BR /&gt;&lt;BR /&gt;...which is probably not what you intended to match.  This can be corrected by adding the '^' anchor:&lt;BR /&gt;&lt;BR /&gt;# echo "/Users/home11"| awk -v FSYS="^/home[0-9]+$" '$NF ~ FSYS { print $0 }' &lt;BR /&gt;&lt;BR /&gt;...or testing for simple equality:&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 May 2011 11:38:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792521#M641324</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-05-31T11:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string with "/" in a variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792522#M641325</link>
      <description>&amp;gt;... awk -v FSYS=/home '$NF ~ (FSYS"[0-9]""$") { print $0 }'&lt;BR /&gt;&lt;BR /&gt;No need to separate the "$" from the rest:&lt;BR /&gt;'$NF ~ (FSYS "[0-9]$") { print $0 }'&lt;BR /&gt;&lt;BR /&gt;&amp;gt;then I match /home1, /home2, /home33 like:&lt;BR /&gt;... awk -v FSYS="/home[0-9]+$" '$NF ~ FSYS&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;... awk -v FSYS=/home '$NF ~ (FSYS"[0-9]+""$") { print $0 }'&lt;BR /&gt;&lt;BR /&gt;Same here:&lt;BR /&gt;... awk -v FSYS=/home '$NF ~ (FSYS "[0-9]+$") { print $0 }'</description>
      <pubDate>Tue, 31 May 2011 12:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-a-string-with-quot-quot-in-a-variable/m-p/4792522#M641325</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-05-31T12:04:40Z</dc:date>
    </item>
  </channel>
</rss>

