<?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: Command qns again... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959220#M4455</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;first, i would recommend you to pick up a good book on shell programming and read it. solves most of your queries and gives a good insight.&lt;BR /&gt;&lt;BR /&gt;1. it is available in that shell. when the shell is terminated, the local variable does not exist. all local variables set in this shell are also avaiable by any shells spawned by this shell. (will help u understand q.4)&lt;BR /&gt;&lt;BR /&gt;2. yes. ctrl+z top stop and then fg to start executing it again. actually this ctl+z can be modified. do an stty -a and see the value for susp.&lt;BR /&gt;&lt;BR /&gt;3. ps, top, pstree etc. and if you can manipulate the psuedo file system /proc for information as well.&lt;BR /&gt;&lt;BR /&gt;4. first and second echo will be mike. since you are changing the value after that, the third will be ben and after that the shell exits. so the changed value of name is not available. and name echoes the value of mike again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;-balaji</description>
    <pubDate>Fri, 25 Apr 2003 03:33:01 GMT</pubDate>
    <dc:creator>Balaji N</dc:creator>
    <dc:date>2003-04-25T03:33:01Z</dc:date>
    <item>
      <title>Command qns again...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959219#M4454</link>
      <description>1.What is the scope of a local variable?&lt;BR /&gt;&lt;BR /&gt;2.Does the Bourne shell support job suspension and resumption?&lt;BR /&gt;&lt;BR /&gt;3.What other command/commands can one use to list the process running on a machine?&lt;BR /&gt;&lt;BR /&gt;4.What does the echo here outputs?&lt;BR /&gt;&lt;BR /&gt;name="Mike"&lt;BR /&gt;&lt;BR /&gt;export name&lt;BR /&gt;&lt;BR /&gt;echo $name&lt;BR /&gt;&lt;BR /&gt;sh&lt;BR /&gt;&lt;BR /&gt;echo $name&lt;BR /&gt;&lt;BR /&gt;name="Ben"&lt;BR /&gt;&lt;BR /&gt;export name&lt;BR /&gt;&lt;BR /&gt;echo $name&lt;BR /&gt;&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;echo $name&lt;BR /&gt;&lt;BR /&gt;:Thanks...</description>
      <pubDate>Fri, 25 Apr 2003 03:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959219#M4454</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-25T03:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Command qns again...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959220#M4455</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;first, i would recommend you to pick up a good book on shell programming and read it. solves most of your queries and gives a good insight.&lt;BR /&gt;&lt;BR /&gt;1. it is available in that shell. when the shell is terminated, the local variable does not exist. all local variables set in this shell are also avaiable by any shells spawned by this shell. (will help u understand q.4)&lt;BR /&gt;&lt;BR /&gt;2. yes. ctrl+z top stop and then fg to start executing it again. actually this ctl+z can be modified. do an stty -a and see the value for susp.&lt;BR /&gt;&lt;BR /&gt;3. ps, top, pstree etc. and if you can manipulate the psuedo file system /proc for information as well.&lt;BR /&gt;&lt;BR /&gt;4. first and second echo will be mike. since you are changing the value after that, the third will be ben and after that the shell exits. so the changed value of name is not available. and name echoes the value of mike again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;-balaji</description>
      <pubDate>Fri, 25 Apr 2003 03:33:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959220#M4455</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-04-25T03:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Command qns again...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959221#M4456</link>
      <description>thanks 4 replying but i am comparing with my answers...that's all...that is y i need u guy's help...i am a newbie in linux...</description>
      <pubDate>Fri, 25 Apr 2003 03:43:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959221#M4456</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-25T03:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Command qns again...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959222#M4457</link>
      <description>ph yes. you are welcome.&lt;BR /&gt;-balaji</description>
      <pubDate>Fri, 25 Apr 2003 03:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959222#M4457</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-04-25T03:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Command qns again...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959223#M4458</link>
      <description>Sophia,&lt;BR /&gt;&lt;BR /&gt;1. local variables declared with the local builtin (bash), are local to the function within which they are defined. They can be declared only within a function. Apart from this, what balaji says holds good for variables defined in the scripts.&lt;BR /&gt;function abc()&lt;BR /&gt;{&lt;BR /&gt; local temp=0 # temp will be local variable in function abc() with local scoping&lt;BR /&gt;...&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;2. To add to what Balaji mentions, bg will resume a suspended process in the background.&lt;BR /&gt;&lt;BR /&gt;$ bg&lt;BR /&gt;&lt;BR /&gt;will resume the first of the suspended processes and run it in the background.&lt;BR /&gt;&lt;BR /&gt;3. ps x, ps eaf  - man ps generally... also looking at /proc/&lt;PROC id=""&gt; is a cool idea, balaji.&lt;BR /&gt;&lt;BR /&gt;4. Nothing to add over what Balaji has added.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;/PROC&gt;</description>
      <pubDate>Fri, 25 Apr 2003 04:24:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-qns-again/m-p/2959223#M4458</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-25T04:24:04Z</dc:date>
    </item>
  </channel>
</rss>

