Search Results

Showing results 1 to 10 of 10
Search took 0.00 seconds.
Search: Posts Made By: omrsafetyo ; Forum: Shell Scripting and child forums
Forum: Shell Scripting Nov 28th, 2008
Replies: 7
Views: 1,078
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
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
Posted By omrsafetyo
^ 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
Posted By omrsafetyo
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
Posted By omrsafetyo
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:
...
Showing results 1 to 10 of 10

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC