Showing results 1 to 40 of 53
Search took 0.01 seconds.
Posts Made By: omrsafetyo
Forum: Shell Scripting 3 Days Ago
Replies: 7
Views: 143
Posted By omrsafetyo
Re: difference btw a process and a job

no - a job is still a single process. Jobs in fact are controlled by their Process ID.

eggi has it right - basically the only "difference" is that you can manage a job through the job manager...
Forum: MySQL 3 Days Ago
Replies: 3
Views: 237
Posted By omrsafetyo
Re: Creating a database

I second that recommendation.
Forum: MySQL 5 Days Ago
Replies: 2
Views: 186
Posted By omrsafetyo
Re: Help with SQL Query

What have you tried so far?
Forum: MySQL 5 Days Ago
Replies: 3
Views: 237
Posted By omrsafetyo
Re: Creating a database

Your phone numbers and addresses should have foreign keys to the contact table - not to the person table. e.g. Swap out p_id for c_id. THis is what he means by
"- Events, addresses and phones...
Forum: MS SQL 5 Days Ago
Replies: 1
Views: 202
Posted By omrsafetyo
Re: URGENT!! Need help regarding primary key!!

SQL Server creates primary keys (by default) as clustered - which means it gets sorted.

Create a NONCLUSTERED primary key and you should be all set.
Forum: Shell Scripting 5 Days Ago
Replies: 12
Views: 402
Posted By omrsafetyo
Re: Beginner in UNIX/Shell Script - Please help

I didn't realize you could call vi in a script like that and execute sed from there - I always sed the file and output to a temp file, and then read back in to the original... this is much cleaner.
Forum: Shell Scripting 5 Days Ago
Replies: 7
Views: 143
Posted By omrsafetyo
Re: difference btw a process and a job

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 can be...
Forum: MS SQL 5 Days Ago
Replies: 2
Views: 144
Posted By omrsafetyo
Re: Return database that a trigger was executed in

It seems so obvious looking at the function name.

Thanks for your help!
Forum: MS SQL 8 Days Ago
Replies: 2
Views: 144
Posted By omrsafetyo
Return database that a trigger was executed in

I would like to create a variable in my trigger - @DBNAME.
When the trigger executes, this value should be set to the name of the database it was executed in.

E.g. for the master database the value...
Forum: Shell Scripting 27 Days Ago
Replies: 3
Views: 425
Posted By omrsafetyo
Re: awk percentage problem

Mike,

Definitely some genius code there.... the one thing you missed is that it needs to skip a column....

I was hoping you could just increment i by 2 - but that doesn't seem to work... I really...
Forum: Shell Scripting 27 Days Ago
Replies: 3
Views: 47,378
Posted By omrsafetyo
Re: Using Shell Script how to send mail automatically

You have already been told - just use the mail command to do what you want to do, nested in the logic you want it done for.

For instance, the following will check to see if a file exists every 3...
Forum: Shell Scripting 27 Days Ago
Replies: 3
Views: 510
Posted By omrsafetyo
Re: How to check my conditions....!!!

Another suggestion - since it looks like you are comparing military time, it will be easier to make the comparison if you drop the ":".

You can do this with sed or tr or even cut very easily.
After...
Forum: Shell Scripting 28 Days Ago
Replies: 3
Views: 9,792
Posted By omrsafetyo
Re: bash:redirecting stdin to at command

Hey - alternatively you can do this natively with the at command:


at now +3 days <enter>
/path/to/script <enter>
Ctrl-D


The at command actually waits for a Ctrl-D (EOF) for termination. You can...
Forum: Shell Scripting 28 Days Ago
Replies: 9
Views: 1,743
Posted By omrsafetyo
Re: Currency format in Bash Script

Your first problem is that you need to define the function above where you call it from - so you should have a functions section at the top of your script, which is where my code should be. I'm...
Forum: Shell Scripting Aug 13th, 2008
Replies: 3
Views: 962
Posted By omrsafetyo
Re: createing an IF variable in .bat file

In my opinion, the easiest way to do this is simply:


net start messenger || echo Messenger service is currently disabled on your computer. Press F1 for instructions to enable this service.


As...
Forum: Shell Scripting Aug 8th, 2008
Replies: 6
Views: 802
Posted By omrsafetyo
Re: Package post-install script problem

Have you tried removing the semi-colon after the first line and tried running it that way?

In my experience, I only put a semi-colon there if the do will be put on the same line. I think that is...
Forum: Shell Scripting Aug 7th, 2008
Replies: 5
Views: 6,366
Posted By omrsafetyo
Re: Shell Programming

I want to go to school where you people all go. My college classes were pretty limited.
Forum: Shell Scripting Jul 25th, 2008
Replies: 6
Views: 689
Posted By omrsafetyo
Re: Help!!!!!!

I have never written pseudocode before - but I was under the assumption that you did not need to define variables - you just basically went through and wrote out (in a human readable format that...
Forum: Shell Scripting Jul 24th, 2008
Replies: 6
Views: 691
Posted By omrsafetyo
Re: print only the last entry of the file

^ Nice and simple, just the way I like it... though I'm more interested in the sed example.
Forum: Shell Scripting Jul 24th, 2008
Replies: 6
Views: 1,073
Posted By omrsafetyo
Re: check input arguments is upper or lower case

with my above function:


while [ "$*" != "" ]
do
working_arg=`test_upper $1`
if [ "x${working_arg}x" != "xx" ]; then
echo "$working_arg is all lowercase."
fi
shift
Forum: Shell Scripting Jul 23rd, 2008
Replies: 1
Views: 554
Posted By omrsafetyo
Re: compare and remove older files

Which part are you having trouble with?

I would have to know a little bit more about the naming scheme of your zip files and etc.
Forum: Shell Scripting Jul 23rd, 2008
Replies: 6
Views: 1,073
Posted By omrsafetyo
Re: check input arguments is upper or lower case

Try this:

function test_upper {
test=`echo $1 | grep [A-Z]`

if [ "$?" = "0" ]; then
#Uppercase letters found.
#translate to lower case:
echo $test | tr '[A-Z]' '[a-z]
else
Forum: Shell Scripting Jul 23rd, 2008
Replies: 6
Views: 909
Posted By omrsafetyo
Re: .sh to vbs

The text is available, it was just a bit hard to read because you hadn't enclosed it in code tags.

It doesn't look like an overly complicated script - though I wonder if you have racadm installed?...
Forum: Shell Scripting Jul 22nd, 2008
Replies: 4
Views: 598
Posted By omrsafetyo
Re: tar issues...

Niether of those solutions worked for me exactly as specified, however the following command worked fine:

$ for file in `tar tvf /u8/sp_archive/2005.tar | grep 1274 | awk '{print $9}'`
> do
> tar...
Forum: Shell Scripting Jul 22nd, 2008
Replies: 6
Views: 909
Posted By omrsafetyo
Re: .sh to vbs

The best thing to do would be to find someone who is fluent in both vbs and shell scripting in order to have them convert the script for you. This may cost some money, especially depending on the...
Forum: Shell Scripting Jul 17th, 2008
Replies: 4
Views: 598
Posted By omrsafetyo
tar issues...

Hey,

I'm trying to unpack certain files from a tar archive - I don't want to unpack all of the 1.2GB file, just a particular bunch of it.

I tried an obvious command:

tar xvf...
Forum: Shell Scripting Jul 16th, 2008
Replies: 5
Views: 1,629
Posted By omrsafetyo
Re: command to telnet console using shell-script

It actually probably should be in most secure environments...

Try this one:

telnet $mailserver <<END
user $USER $PWORD
/path/to/HELO
exit
END
Forum: Shell Scripting Jul 8th, 2008
Replies: 2
Views: 483
Posted By omrsafetyo
Re: what is not found???

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 need to...
Forum: IT Professionals' Lounge Jul 5th, 2008
Replies: 2
Views: 594
Posted By omrsafetyo
Re: scripts in a cron tab

I can only think of using a log file of sorts. At the beginning of your first script have it output a '0' (false) to the log file. At the end of the script, upon successful execution, have it...
Forum: Legacy and Other Languages Jul 3rd, 2008
Replies: 5
Views: 1,534
Posted By omrsafetyo
Re: Need to send Cntrl +C to an Running Exe using a DOS batch File.

Ancient Dragon is correct, there is no way of manipulating threads using batch - or in other words, there is no command redirection available under command.com which allows you to send command output...
Forum: C++ Jul 3rd, 2008
Replies: 13
Views: 793
Posted By omrsafetyo
Re: Programing Printers

That is definitely more advanced than I have worked with in the past.

It sounds like Canon has given you the command set available for their proprietary driver for this device. I think what you...
Forum: C++ Jul 2nd, 2008
Replies: 4
Views: 352
Posted By omrsafetyo
Re: Making gcc/g++ output errors to a file

Try this:


g++ "C:\HellowWorld.cpp" 2> "C:\output.log"


You could probably also do:


g++ "C:\HellowWorld.cpp" 1>2> "C:\output.log"
Forum: Shell Scripting Jul 2nd, 2008
Replies: 1
Views: 381
Posted By omrsafetyo
Re: Decision

Well, you will not make it very far in UNIX System administration without knowing Shell scripting. You will also do well with UNIX admin with C/C++ under your belt - or perhaps some python or maybe...
Forum: C++ Jul 1st, 2008
Replies: 13
Views: 793
Posted By omrsafetyo
Re: Programing Printers

If this is PCL compatible, I can certainly help with that.

If its PostScript help you need, then I probably can't be of much assistance.

Can you identify the model of the printer, and whether or...
Forum: Shell Scripting Jul 1st, 2008
Replies: 1
Views: 462
Posted By omrsafetyo
Re: please take a look at my question

You are only returning (echoing) the last iteration of badcommand. Your while/for/if loop above assigns the current argument that it is processing to the badcommand variable. You let that loop run...
Forum: MS SQL Jun 29th, 2008
Replies: 3
Views: 1,305
Posted By omrsafetyo
Re: Help MsSQL stored procedure

I would also wrap your sql in some code=sql tags. It's hard to see everything - but for instance, it looks like you have some mixed and/or missing quotes
Forum: Shell Scripting Jun 29th, 2008
Replies: 6
Views: 1,460
Posted By omrsafetyo
Re: unix little quiz

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: 761
Posted By omrsafetyo
Re: 101 scripting questions

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 27th, 2008
Replies: 1
Views: 817
Posted By omrsafetyo
Re: read from file in linux shell scripting

#usage myscript.sh filename

filename=$1 #read argument "filename"

if [ -f $filename ] #if file exists
then #print it
lp $filename
else #create it
touch $filename
fi
Forum: Shell Scripting Jun 26th, 2008
Replies: 4
Views: 1,742
Posted By omrsafetyo
Re: Script to telnet to another server

username="myUser"
password=`cat dummy.txt`
# alternatively:
#password=$1
telnet 172.11.11.21 8101 <<EOF
$username
$password
#insert command here
EOF
Showing results 1 to 40 of 53

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:35 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC