<?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 A simple shell question(about variable)! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793207#M80315</link>
    <description>I define a variable "ssuinfo" in the shell script.&lt;BR /&gt;If get strings from an application. Sometimes it get "jack", sometimes it get "@jack", and also can get "@@ja@ck". The number and position of the character "@" is unsure. &lt;BR /&gt;But now all "@" is useless for me. So I want to truncate all "@" in the variable "ssuinfo". &lt;BR /&gt;How can I achieve it?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!</description>
    <pubDate>Sat, 24 Aug 2002 02:56:37 GMT</pubDate>
    <dc:creator>Fragon</dc:creator>
    <dc:date>2002-08-24T02:56:37Z</dc:date>
    <item>
      <title>A simple shell question(about variable)!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793207#M80315</link>
      <description>I define a variable "ssuinfo" in the shell script.&lt;BR /&gt;If get strings from an application. Sometimes it get "jack", sometimes it get "@jack", and also can get "@@ja@ck". The number and position of the character "@" is unsure. &lt;BR /&gt;But now all "@" is useless for me. So I want to truncate all "@" in the variable "ssuinfo". &lt;BR /&gt;How can I achieve it?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!</description>
      <pubDate>Sat, 24 Aug 2002 02:56:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793207#M80315</guid>
      <dc:creator>Fragon</dc:creator>
      <dc:date>2002-08-24T02:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: A simple shell question(about variable)!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793208#M80316</link>
      <description>Hi,&lt;BR /&gt;Something like this ?&lt;BR /&gt;&lt;BR /&gt;export ssuinfo="@@j@ack"&lt;BR /&gt;echo $ssuinfo&lt;BR /&gt;@@j@ack&lt;BR /&gt;export ssuinfo=$(echo $ssuinfo | tr -d "@")&lt;BR /&gt;echo $ssuinfo&lt;BR /&gt;jack&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom</description>
      <pubDate>Sat, 24 Aug 2002 08:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793208#M80316</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-08-24T08:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: A simple shell question(about variable)!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793209#M80317</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;tr -d "@"&lt;BR /&gt;&lt;BR /&gt;should do it.&lt;BR /&gt;&lt;BR /&gt;See extract from man tr below:&lt;BR /&gt;===============================================&lt;BR /&gt;tr copies the standard input to the standard output with substitution&lt;BR /&gt;or deletion of selected characters.  Input characters from string1 are&lt;BR /&gt;replaced with the corresponding characters in string2. If necessary,&lt;BR /&gt;string1 and string2 can be quoted to avoid pattern matching by the&lt;BR /&gt;shell.&lt;BR /&gt;&lt;BR /&gt;tr recognizes the following command line options:&lt;BR /&gt;&lt;BR /&gt;     -A             Translates on a byte-by-byte basis. When this flag&lt;BR /&gt;                    is specified tr does not support extended&lt;BR /&gt;                    characters.&lt;BR /&gt;&lt;BR /&gt;     -c             Complements the set of characters in string1,&lt;BR /&gt;                    which is the set of all characters in the current&lt;BR /&gt;                    character set, as defined by the current setting&lt;BR /&gt;                    of LC_CTYPE, except for those actually specified&lt;BR /&gt;                    in the string1 argument. These characters are&lt;BR /&gt;                    placed in the array in ascending collation&lt;BR /&gt;                    sequence, as defined by the current setting of&lt;BR /&gt;                    LC_COLLATE.&lt;BR /&gt;&lt;BR /&gt;     -d             Deletes all occurrences of input characters or&lt;BR /&gt;                    collating elements found in the array specified in&lt;BR /&gt;                    string1.&lt;BR /&gt;&lt;BR /&gt;                    If -c and -d are both specified, all characters&lt;BR /&gt;                    except those specified by string1 are deleted. The&lt;BR /&gt;                    contents of string2 are ignored, unless -s is also&lt;BR /&gt;                    specified. Note, however, that the same string&lt;BR /&gt;                    cannot be used for both the -d and the -s flags;&lt;BR /&gt;                    when both flags are specified, both string1 (used&lt;BR /&gt;                    for deletion) and string2 (used for squeezing) are&lt;BR /&gt;                    required.&lt;BR /&gt;&lt;BR /&gt;                    If -d is not specified, each input character or&lt;BR /&gt;                    collating element found in the array specified by&lt;BR /&gt;                    string1 is replaced by the character or collating&lt;BR /&gt;                    element in the same relative position specified by&lt;BR /&gt;                    string2.&lt;BR /&gt;&lt;BR /&gt;     -s             Replaces any character specified in string1 that&lt;BR /&gt;                    occurs as a string of two or more repeating&lt;BR /&gt;                    characters as a single instance of the character&lt;BR /&gt;                    in string2.&lt;BR /&gt;&lt;BR /&gt;                    If the string2 contains a character class, the&lt;BR /&gt;                    argument's array contains all of the characters in&lt;BR /&gt;                    that character class. For example:&lt;BR /&gt;                    In a case conversion, however, the string2 array&lt;BR /&gt;                    contains only those characters defined as the&lt;BR /&gt;                    second characters in each of the toupper or&lt;BR /&gt;                    tolower character pairs, as appropriate. For&lt;BR /&gt;                    example:&lt;BR /&gt;&lt;BR /&gt;                    tr -s '[:upper:]' '[:lower:]'&lt;BR /&gt;&lt;BR /&gt;===============================================&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;Best Regards&lt;BR /&gt;Yogeeraj&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Aug 2002 10:31:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793209#M80317</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-08-24T10:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: A simple shell question(about variable)!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793210#M80318</link>
      <description>Hi&lt;BR /&gt;How do you get the string into "ssuinfo" ? Something like:&lt;BR /&gt;ssuinfo=`&lt;YOURAPPLICATION&gt;`&lt;BR /&gt;Try:&lt;BR /&gt;ssuinfo=`&lt;YOURAPPLICATION&gt; |tr -d "@"`&lt;BR /&gt;&lt;BR /&gt;&lt;/YOURAPPLICATION&gt;&lt;/YOURAPPLICATION&gt;</description>
      <pubDate>Sat, 24 Aug 2002 12:26:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793210#M80318</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-08-24T12:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: A simple shell question(about variable)!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793211#M80319</link>
      <description>While piping the output through tr -d will ceratinly fix the problem (as long as you only get extraneous @'s), the better answer is to fix the underlying problem. You really should determine why you are getting the extraneous characters and thus fix the problem rather than dealing with the symptoms.&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Aug 2002 19:06:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-simple-shell-question-about-variable/m-p/2793211#M80319</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-08-24T19:06:08Z</dc:date>
    </item>
  </channel>
</rss>

