Forum: Shell Scripting Nov 28th, 2008 |
| Replies: 7 Views: 1,078 A job is a process running in the background.
E.g.
./myscript.sh &
[1] myscript.sh 96243
A job relates to a command run from a terminal. It is attached to a terminal session. A command... |
Forum: Shell Scripting Jul 8th, 2008 |
| Replies: 2 Views: 1,011 The above from Salem's post needs to be done to fix your issue.. but you may also want to fix your if statement.
if [ "$result" = "$next" ]
The data in these variables are strings and... |
Forum: Shell Scripting Jun 29th, 2008 |
| Replies: 6 Views: 3,411 Yeah... where are you taking this "quiz"?
You seem to have a lot of questions, and it is certainly hard to tell if its because you are trying to learn or cheat. If its just an online quiz - can you... |
Forum: Shell Scripting Jun 27th, 2008 |
| Replies: 2 Views: 2,119 In order just to type the name of the file to execute, it needs to be in an executable directory - so for e.g. if you have a script that is used frequently, drop it in /usr/local/bin and it will... |
Forum: Shell Scripting Jun 19th, 2008 |
| Replies: 9 Views: 3,185 A final script that parses cents, if input using a dot ("."):
function formatCurr {
dollar_amt=$1
cents=`echo $dollar_amt | grep '\.'`
if [[ "x${cents}x" != "xx" ]]
then
cent_amt=`echo... |
Forum: Shell Scripting Jun 18th, 2008 |
| Replies: 9 Views: 3,185 Try the following out:
function formatCurr {
dollar_amt=$1
length=`echo $dollar_amt | awk '{ print length($0) }'`
mod=`expr $length % 3`
div3=`expr $length / 3`
if [[ $mod -ne 0 ]]
then |
Forum: Shell Scripting Jun 11th, 2008 |
| Replies: 5 Views: 1,272 I like your answer as well - but didn't see where you started your search before I started replying (hence why I mentioned my find returns a relative path). By the time I noticed it, I was too far... |
Forum: Shell Scripting Jun 9th, 2008 |
| Replies: 5 Views: 1,272 ^ My find command returns a relative path from the current directory - I believe this is how most find commands work.
You can write an advanced function to find the absolute path name, but here... |
Forum: Shell Scripting Jun 5th, 2008 |
| Replies: 2 Views: 913 When I am trying to do something to all users in the /home directory, I will do something like this:
for user in `ls /home`
do
#insert action here
#mail -s "Subject" -f "file" -c... |
Forum: Shell Scripting Jun 3rd, 2008 |
| Replies: 4 Views: 2,291 What this question means is "What can you specify in your PATH environment variable which wil allow you to run scripts in the current directory."
For instance, my default PATH variable is:
... |