Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~19.7K People Reached

43 Posted Topics

Member Avatar for subhashmedhi

It actually probably should be in most secure environments... Try this one: [code] telnet $mailserver <<END user $USER $PWORD /path/to/HELO exit END [/code] set up the mailserver, USER and PWORD variables accordingly. You usually need to authenticate with telnet.

Member Avatar for Tabsy
0
2K
Member Avatar for sanju456

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 minutes. If the file exists, it will e-mail the …

Member Avatar for sftranna
0
2K
Member Avatar for bops

Try this: [code] g++ "C:\HellowWorld.cpp" 2> "C:\output.log" [/code] You could probably also do: [code] g++ "C:\HellowWorld.cpp" 1>2> "C:\output.log" [/code] Just in case stdout did produce any output. 2 specifies that "standard error" or "stderr" or errors be redirected; 1 is standard output or "stdout" - that is, anything that the …

Member Avatar for swagatata
0
4K
Member Avatar for omrsafetyo

I am trying to keep formatting between cell references. For instance, I have a date in once cell (J9) and would like to add this date to a text field so e.g.: ="This will take effect on " & J9 & "." However, when I do this, I end up …

Member Avatar for omrsafetyo
0
149
Member Avatar for omrsafetyo

Unfortunately, I don't think this question is solved with a simple vlookup, or etc. I have a spreadsheet that has several tables of data with the following format on one sheet: gxxxx gxxxx gxxxx zzzzz gxxxx gxxxx gxxxx zzzzz The "g"s above would indicate an item for lookup. The "z"s …

Member Avatar for omrsafetyo
0
165
Member Avatar for Achupa

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 belong to contacts, not the user (person in your case), as you had indicated." …

Member Avatar for verruckt24
0
191
Member Avatar for rexmont
Member Avatar for learnpro

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.

Member Avatar for eggi
0
180
Member Avatar for Trekker182

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 run in the background if it doesn't require any user input, and you want …

Member Avatar for omrsafetyo
0
511
Member Avatar for isaackhazi

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.

Member Avatar for omrsafetyo
0
148
Member Avatar for omrsafetyo

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 of @DBNAME would be master. How would I go about figuring out …

Member Avatar for omrsafetyo
0
132
Member Avatar for packet

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 that, you can do the if comparison. Otherwise you will need …

Member Avatar for JeoSaurus
0
163
Member Avatar for rockX

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 don't know all that you are doing there, so I was unable …

Member Avatar for eggi
0
178
Member Avatar for flying

Hey - alternatively you can do this natively with the at command: [code] at now +3 days <enter> /path/to/script <enter> Ctrl-D [/code] The at command actually waits for a Ctrl-D (EOF) for termination. You can feed it an entire command by echoing want you want to run and piping that …

Member Avatar for omrsafetyo
0
245
Member Avatar for prabowoadis

Try the following out: [code] 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 dollar_pt0=`echo $dollar_amt | cut -c 1-$mod` fi dollar_fin=`echo "${dollar_pt0}"` modp1=`expr $mod + 1` incr=`expr $mod + 3` for …

Member Avatar for omrsafetyo
0
966
Member Avatar for programmer321

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 from a control-c into the input thread of a running program. You would have to use a …

Member Avatar for mittelgeek
0
1K
Member Avatar for pure_evil020

In my opinion, the easiest way to do this is simply: [code] net start messenger || echo Messenger service is currently disabled on your computer. Press F1 for instructions to enable this service. [/code] As opposed to && which would run the second command (the echo) only if the first …

Member Avatar for pure_evil020
0
95
Member Avatar for kingpmp

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 unnecessary - let me know how that works out, because other …

Member Avatar for eggi
0
123
Member Avatar for MAD_DOG

I want to go to school where you people all go. My college classes were pretty limited.

Member Avatar for eggi
0
588
Member Avatar for andy4919

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 looks like programming) the logic of the program. [url]http://en.wikipedia.org/wiki/Pseudocode[/url] For instance: [code=pseudocode] calculate_attendance( classes_attended, …

Member Avatar for andy4919
0
263
Member Avatar for picass0

Try this: [code] 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 #letters are all lowercase, return them. echo $1 fi } [/code] Not exactly sure what you want your …

Member Avatar for ghostdog74
0
2K
Member Avatar for picass0
Member Avatar for ghostdog74
0
117
Member Avatar for stooartbaby

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 size of the project. The thing of it is, is that most …

Member Avatar for stooartbaby
0
917
Member Avatar for ivorb

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.

Member Avatar for omrsafetyo
0
86
Member Avatar for omrsafetyo

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 /u8/sp_archive/2005.tar *1274* All files I want to extract have "1274" in the name; I want …

Member Avatar for eggi
0
163
Member Avatar for antona

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 not there is a PCL driver available for it? Preferably a PCL 5 or …

Member Avatar for antona
0
508
Member Avatar for k2k

The above from Salem's post needs to be done to fix your issue.. but you may also want to fix your if statement. [code] if [ "$result" = "$next" ] [/code] The data in these variables are strings and need to be compared as such. It probably isn't necessary, but …

Member Avatar for omrsafetyo
0
87
Member Avatar for chippy_hewitt

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 output a '1'. In your second script you can then read …

Member Avatar for linux
0
125
Member Avatar for programmer321

[code] username="myUser" password=`cat dummy.txt` # alternatively: #password=$1 telnet 172.11.11.21 8101 <<EOF $username $password #insert command here EOF [/code]

Member Avatar for eggi
0
204
Member Avatar for D.Mohanraj

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 preferably Perl (depending on who you ask). I would say with Microsoft System Administrator …

Member Avatar for omrsafetyo
0
89
Member Avatar for k2k

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 through all arguments and THEN exit out of the loop and echo. It's only echoing the last command it …

Member Avatar for omrsafetyo
0
140
Member Avatar for Mohfeza

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

Member Avatar for varmadba
0
194
Member Avatar for k2k

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 provide a link? I'd be interested in taking a …

Member Avatar for masijade
1
531
Member Avatar for k2k

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 become executable from anywhere. You can also add the current …

Member Avatar for k2k
0
142
Member Avatar for sameer9812

[code] #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 [/code]

Member Avatar for omrsafetyo
0
62
Member Avatar for davidcitron

Yes, export the data as csv - you can do this easily with DTS; or you can do with BCP from the command line: [code] C:\> BCP database.dbo.table out mytable.csv -S<servername> -Uusername -Ppassword [/code] DTS may better serve you. Then upload it to your web server and load into mysql …

Member Avatar for pclfw
0
185
Member Avatar for mgouge

What tables are you querying and what columns are you comparing?

Member Avatar for mgouge
0
129
Member Avatar for marcux

^ 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 is how I would do this: [code] $ cd `find /usr/local -name "jdk1.6*" -type …

Member Avatar for eggi
0
125
Member Avatar for k2k

When I am trying to do something to all users in the /home directory, I will do something like this: [code] for user in `ls /home` do #insert action here #mail -s "Subject" -f "file" -c "${user}@student.uml.edu" done [/code]

Member Avatar for k2k
0
107
Member Avatar for maxmave
Member Avatar for omrsafetyo
0
114
Member Avatar for k2k

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: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games omrsafetyo@kulas-net:~$ echo "echo it worked" > script1 omrsafetyo@kulas-net:~$ script1 bash: script1: command not found But, if I …

Member Avatar for omrsafetyo
0
138
Member Avatar for linux

No, thats actually exactly wrong. The mv command does not make a new file. Period. The datablocks holding the information remain unchanged. All that happens is that the entry in the directory file that holds the inode information is copied to the new directory, and then the inode information is …

Member Avatar for eggi
0
121
Member Avatar for k2k

I don't know of any command that will do this directly for you - and awk would probably be the way to go, but I'm no awk guru. This could probably also be done through some very impressive sed magic - but again, I'm no sed guru. So doing this …

Member Avatar for ghostdog74
0
142

The End.