- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Command qns again...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2003 08:15 PM
тАО04-24-2003 08:15 PM
2.Does the Bourne shell support job suspension and resumption?
3.What other command/commands can one use to list the process running on a machine?
4.What does the echo here outputs?
name="Mike"
export name
echo $name
sh
echo $name
name="Ben"
export name
echo $name
exit
echo $name
:Thanks...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2003 08:33 PM
тАО04-24-2003 08:33 PM
Solutionfirst, 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.
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)
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.
3. ps, top, pstree etc. and if you can manipulate the psuedo file system /proc for information as well.
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.
hth
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2003 08:43 PM
тАО04-24-2003 08:43 PM
Re: Command qns again...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2003 08:53 PM
тАО04-24-2003 08:53 PM
Re: Command qns again...
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2003 09:24 PM
тАО04-24-2003 09:24 PM
Re: Command qns again...
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.
function abc()
{
local temp=0 # temp will be local variable in function abc() with local scoping
...
}
2. To add to what Balaji mentions, bg will resume a suspended process in the background.
$ bg
will resume the first of the suspended processes and run it in the background.
3. ps x, ps eaf - man ps generally... also looking at /proc/
4. Nothing to add over what Balaji has added.
HTH.
- ramd.