Sponsored Content
Full Discussion: Processes Lab
Homework and Emergencies Homework & Coursework Questions Processes Lab Post 302778385 by bakunin on Sunday 10th of March 2013 10:17:06 PM
Old 03-10-2013
Quote:
Originally Posted by Jagst3r21
How come for 2.3 I cannot enter another command? After I do
Code:
fg %<job number for sleep 6000 here>

I do not get the dollar sign back to proceed and do
Code:
ctrl + z

for
Code:
nohup sleep 3000 &

.
I'd say works as designed. ;-)) "fg" is the command to get to the FOREGROUND a process which was previously put into the BACKGROUND (or has been suspended). As long as a process is running in the foreground you get no prompt (it is often a dollar sign, but it doesn't have to), because the prompt display is the shells way of saying "there is no process in foreground so i am ready for input".

Quote:
Originally Posted by Jagst3r21
I realize now that I am not sure how to make the ctrl + z targets the nohup sleep 3000 & command either.
Of all the processes running from your shell there can be none, one or several in the background and none or one (not several!) in the foreground. This answers the question: "CTRL-Z" or other job-control key sequences ("CTRL-C", for instance) only affect the process running in the foreground.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

VMWare Workstation for home lab

I was wondering if anyone has used VMWare Workstation? I wanted to practice and learn Unix in a networking environment and have my own home lab. However room and money prevent me from buying several computers to do so. Any input would help thank you. (0 Replies)
Discussion started by: vedder191
0 Replies

2. Programming

Shell Script Lab

In the following Shell Script can anyone help me? What are the total scripts? What are the total binaries? What are the total files? #!/bin/sh GREP="/bin/grep -q" if ; then if ; then for | in ${I}/* ;do file ${I} | ${GREP} "executable" && echo "${I} is a binary" file ${I} |... (1 Reply)
Discussion started by: rktompsett
1 Replies

3. Shell Programming and Scripting

cant complete lab ???

heres the lab i did everything but when i issue the automated lab check. but it gives me this everytime ''you are missing the /home/smichaels/Labs/lab2b/group file, please create it as per step 12 of the lab. once you have corrected this problem, re-run the uli101.023 program'' im... (1 Reply)
Discussion started by: ink
1 Replies

4. Homework & Coursework Questions

Help completing lab.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: ''you are missing the /home/smichaels/Labs/lab2b/group file, please create it as per step 12 of the lab. once... (4 Replies)
Discussion started by: ink
4 Replies

5. Homework & Coursework Questions

shell scripting while loop lab 15 help

hi.. this is shell scripting lab15.sh i dont understand this lab i am at the screen shot part. i was wondering if someone can take a quick look at this lab i have linked the doc below. i dont know where to start i have did the Required Errorlevels Errorlevel # but dont... (1 Reply)
Discussion started by: beerpong1
1 Replies

6. Shell Programming and Scripting

help me with lab im new to bash....

Write a script that copies the file tree (including subdirectories) in your home directory. As the initial directory to take the directory / usr / share / doc, as the destination directory using the directory $ {HOME} / doc. Write a script corresponding to paragraph 1. Additional conditions: a)... (1 Reply)
Discussion started by: elginmulizwa
1 Replies

7. Hardware

Electricity Savings for home lab

So, I have a kindof off the wall question. I've got 10 computers which I inherited from a charter school that closed that I did their admin work for. They're not servers, just workstations with ubuntu server running on them. I had them all up and running at one point... but crimineys the load on my... (8 Replies)
Discussion started by: jtollefson
8 Replies

8. Homework & Coursework Questions

Lab ^

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Filter a file for lines that have exactly 5 numbers in a row. 2. Relevant commands, code, scripts,... (13 Replies)
Discussion started by: herb bertz
13 Replies

9. Homework & Coursework Questions

System Admin. Lab

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Create a group id with your last name. Create 2 user IDs using your last name and the numbers 1 and 2. For each... (3 Replies)
Discussion started by: Jagst3r21
3 Replies

10. Hardware

Lab server organized software

Hello, Do you have any suggestion of any tool (web based preferably) about how to organize a lab environment? Now i save some info in excel sheet (one rack per column) , but i was thinking if any software exists. Thanks in advance! (2 Replies)
Discussion started by: @dagio
2 Replies
SHELL-QUOTE(1)						User Contributed Perl Documentation					    SHELL-QUOTE(1)

NAME
shell-quote - quote arguments for safe use, unmodified in a shell command SYNOPSIS
shell-quote [switch]... arg... DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands or files with embedded white space or shell globbing characters safely. Here are a few examples. EXAMPLES
ssh preserving args When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and passes them to "$SHELL -c". This doesn't work as intended: ssh host touch 'hi there' # fails It creates 2 files, hi and there. Instead, do this: cmd=`shell-quote touch 'hi there'` ssh host "$cmd" This gives you just 1 file, hi there. process find output It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote: eval set -- `find -type f -print0 | xargs -0 shell-quote --` debug shell scripts shell-quote is better than echo for debugging shell scripts. debug() { [ -z "$debug" ] || shell-quote "debug:" "$@" } With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can. save a command for later shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are things the user can't pass through), you can do something like this: user_switches= while [ $# != 0 ] do case x$1 in x--pass-through) [ $# -gt 1 ] || die "need an argument for $1" user_switches="$user_switches "`shell-quote -- "$2"` shift;; # process other switches esac shift done # later eval "shell-quote some-command $user_switches my args" OPTIONS
--debug Turn debugging on. --help Show the usage message and die. --version Show the version number and exit. AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions. AUTHOR
Roderick Schertler <roderick@argon.org> perl v5.16.3 2010-06-11 SHELL-QUOTE(1)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy