Search Results

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: mittelgeek
Forum: Shell Scripting Apr 23rd, 2009
Replies: 3
Views: 1,321
Posted By mittelgeek
Sorry about the delayed response. Been working insane hours.

Try NextNumber=$(( NextNumber + 1 )) or ((NextNumber++)).

You may want to take a look at this thread: Increment integer using Shell...
Forum: Legacy and Other Languages Apr 23rd, 2009
Replies: 5
Views: 1,674
Posted By mittelgeek
Please put your code/script within the [CODE] tag so that it does interpret the script contents as smiley's and html.

So From what I can see you might want to use the sleep command to affect a...
Forum: Shell Scripting Mar 25th, 2009
Replies: 3
Views: 1,321
Posted By mittelgeek
I think you should take a quick look at this thread: Adding a new column in a text file (http://www.daniweb.com/forums/thread181214.html). It seems that they are requesting something very similar to...
Forum: Shell Scripting Mar 25th, 2009
Replies: 2
Views: 1,315
Posted By mittelgeek
You may want to include >nul 2>&1 at the end of the md as the script will undoubtedly list errors after creating the directory the first time.

Ex:
for /f "delims=." %%n in ('dir /b *.exe') do (md...
Forum: Legacy and Other Languages Mar 25th, 2009
Replies: 5
Views: 1,674
Posted By mittelgeek
Depending on what you are trying to delete you can use the following command:

del /f /q /s "FILENAME.EXT"

You'll need th quotes if the file name contains spaces & possibly if there are special...
Forum: Shell Scripting Sep 28th, 2008
Replies: 10
Views: 2,521
Posted By mittelgeek
In reference to this comment:

Have you tried xargs? With maybe a loop that terminates at end of line/file? Just giving you another option.

I personally agree with Gromit about using PERL or...
Forum: Legacy and Other Languages Sep 28th, 2008
Replies: 1
Views: 1,542
Posted By mittelgeek
Sorry about the formatting. I tried to use LaTeX formatting codes, but to no avail... =8(


\begin{tabular}{| c | c | c | c |}
\hline
Area Code & \$0.00 & \$0.10 & \$0.13 \\...
Forum: Legacy and Other Languages Sep 3rd, 2008
Replies: 4
Views: 6,477
Posted By mittelgeek
In order to get what you want to happen try this [all one line]:
start firefox www.google.com & start "C:\Program Files\MultipleIEs\IE6\IEXPLORE.exe" www.google.com & start "C:\Program...
Forum: Legacy and Other Languages Sep 3rd, 2008
Replies: 5
Views: 2,263
Posted By mittelgeek
All the other posters are correct from what I can tell. If you want to access a thread of a process your out of luck unless you bust out some C/C++ code to terminate it. If you just want to kill the...
Forum: Legacy and Other Languages Sep 3rd, 2008
Replies: 1
Views: 1,076
Posted By mittelgeek
Well the problem with using echo %text% >> C:\Documents and Settings\Owner\Desktop\log.txt is that the C:\Documents and Settings\Owner\Desktop\log.txt needs to be in quotes.

I would recommend that...
Forum: Legacy and Other Languages Sep 3rd, 2008
Replies: 5
Views: 2,417
Posted By mittelgeek
Yeah you need quotes around file/directories that need quotes.

If you want to find out what the DOS 8.3 filename is use dir /x SOMEDIRNAME or dir /x SOMEFILENAME etc...
Forum: Legacy and Other Languages Aug 21st, 2007
Replies: 6
Views: 6,973
Posted By mittelgeek
Yeah that should work, with a few changes:
for /f "usebackq tokens=*" %%g in (`dir /b /s /A:d`) do @cd "%%g" && @ren *.extn1 *.extn2 But in my original reply to the original post by pink_zippy_123,...
Forum: Legacy and Other Languages Jun 11th, 2007
Replies: 6
Views: 6,973
Posted By mittelgeek
Absolutely. I didn't reread his post before I submitted mine.
for /f "usebackq tokens=1 delims=." %g in (`dir /b /s .\*.tql`) do @ren %g.tql %g.sql
I think that should fix him up.

Thanks for...
Forum: Shell Scripting Jun 9th, 2007
Replies: 2
Views: 1,828
Posted By mittelgeek
Unfortunately, I need to rearrange the partitions on my laptop so that I can boot linux so I can't test your script out, but...

You might want to check out this for some tips on using the $RANDOM...
Forum: Legacy and Other Languages Jun 8th, 2007
Replies: 3
Views: 1,652
Posted By mittelgeek
Linux provides a full complement of switches to the shutdown command and many distributions provide aliases to many commonly used variants, e.g., reboot, poweroff, etc.

Unless you are trying to...
Forum: Legacy and Other Languages Jun 8th, 2007
Replies: 6
Views: 6,973
Posted By mittelgeek
For the dataset:

C:\DOCS>dir
Volume in drive C has no label.
Volume Serial Number is xxxx-xxxx

Directory of C:\DOCS

05/29/2007 11:12 AM <DIR> .
05/29/2007 11:12 AM ...
Forum: Legacy and Other Languages Jun 8th, 2007
Replies: 3
Views: 1,652
Posted By mittelgeek
If your planning on doing this in Windows then try shutdown /? [XP & 2K3; not sure about 2K and I am almost positive that it is not native to NT]. It will save you some work.

If you plan on doing...
Forum: Legacy and Other Languages Jun 4th, 2007
Replies: 29
Views: 35,520
Posted By mittelgeek
I just reread the OP and think that this might do what you need to get done:

@echo off
cls
poweroff wol -ip 192.168.0.3 -subnet 255.255.255.0 -mac 0xxxx00xxxxx

:return
ping 192.168.0.3 > nul...
Forum: Legacy and Other Languages Jun 2nd, 2007
Replies: 29
Views: 35,520
Posted By mittelgeek
Yeah I looked at what I wrote again. FOR /L iterates through a series of numbers using (START,STEP,END) for the parameters.

FOR /F uses the content of (FILENAME or TEXT) as its parameters.

I...
Forum: Legacy and Other Languages May 31st, 2007
Replies: 29
Views: 35,520
Posted By mittelgeek
Whoops! I messed up the for statement. It should read:
for /f %g in (1,1,254) do @ping 192.168.20.%g 2>&1 > nul && echo Alive 192.168.20.%g || echo Dead 192.168.20.%g
Sorry. =8(
Forum: Legacy and Other Languages May 30th, 2007
Replies: 5
Views: 3,254
Posted By mittelgeek
Try using CTRL+H

Then change your TERM environment variable to emulate the correct Terminal.

Next post in the Unix/Hardware/Troubleshooting forum. *nix is probably your best bet. Although they...
Forum: Legacy and Other Languages May 30th, 2007
Replies: 4
Views: 74,384
Posted By mittelgeek
Try putting quotes around 2.5 and $temp like so:
if ["$temp" -ge "2.5"] then;
otherwise set a variable equal to 2.5 and test that:

SOME_VALUE=2.5
if [$temp -ge $SOME_VAULE] then;
This may...
Forum: Legacy and Other Languages May 30th, 2007
Replies: 3
Views: 32,462
Posted By mittelgeek
@echo off
reg query RootKeyName\Path\To\Key\To\Query /v KeyName || echo Does not Exist!!!!
I think that should work. I don't know off hand what the ERRORLEVEL output of this command is if it does...
Forum: Legacy and Other Languages May 30th, 2007
Replies: 3
Views: 4,486
Posted By mittelgeek
For the data set:

C:\FileManager\Implementation\bin\Debug\fileman.dll
C:\Viewer\Implementation\bin\Debug\viewer.dll
C:\Resource\Implementation\bin\Debug\resource.dll

Try something like:...
Forum: Legacy and Other Languages May 30th, 2007
Replies: 29
Views: 35,520
Posted By mittelgeek
Just a little trick that I picked up from PERL:

|| first or second -----> Do second if first fails

&& first and second --> Do second only if first succeeds

This is a one liner that I came up...
Forum: Shell Scripting Oct 16th, 2005
Replies: 2
Views: 11,638
Posted By mittelgeek
You were off to a good start.

Here what I did:

./first


./killdup
#!/bin/sh
Forum: *nix Hardware Configuration Sep 16th, 2005
Replies: 2
Views: 3,143
Posted By mittelgeek
The quick and dirty answer is: hdparm -d1 /dev/[drive]

-dx enable (1) / disable (0) DMA
Forum: *nix Software Aug 24th, 2005
Replies: 2
Views: 1,473
Posted By mittelgeek
So apparently you want to set this box up to be a:

router
webserver
mail server

Although all these things can be done on the one machine, I personally would consider it a bit of security...
Forum: *nix Software Aug 7th, 2005
Replies: 3
Views: 3,100
Posted By mittelgeek
Probably not because of the version of linux you are using, but maybe because of the distro. Perhaps a cockup when they put it altogether.

Sorry, it's been a while since I used Gnome so I'm not...
Forum: *nix Software Aug 7th, 2005
Replies: 1
Views: 4,208
Posted By mittelgeek
I setup bind on a 486 DX2 with 48MB of RAM for the company I used to work for. Still running right now.

The company was given five IPs by their Telco/ISP. I set the websever and the DNS server to...
Forum: *nix Software Aug 7th, 2005
Replies: 5
Views: 4,439
Posted By mittelgeek
netconfig is your best friend and setup is its mother.

root privileges are best.

All your Slack belong to us. =8)
Forum: *nix Software Aug 7th, 2005
Replies: 1
Views: 4,185
Posted By mittelgeek
Strangely enough I built a very similar server for the company I use to work for.

I did install Slackware 9.1, IIRC. Actually, I installed Slackware because I was having problem getting the RAID...
Forum: *nix Software Aug 7th, 2005
Replies: 3
Views: 3,003
Posted By mittelgeek
From In search of l33t (http://blog.subverted.net/?p=397) [subverted.net]:



The guy also suggests touching forcefsck under root (/). IIRC, both of these things were suggested in Essential...
Forum: *nix Software Aug 7th, 2005
Replies: 3
Views: 3,100
Posted By mittelgeek
Been awhile since I have jumped on a linux gui (think the last one was Fluxbox), but IIRC you should be able start an editor - gui version, if you like - by running a command via the Gnome Menu....
Forum: *nix Software Aug 7th, 2005
Replies: 1
Views: 1,861
Posted By mittelgeek
Depends on what shell you using. The variable that is being changed needs to be included in the startup "script" that the shell uses.

If appending, you can do this: PATH=$PATH:/foo/bar , but if...
Forum: Networking Hardware Configuration Aug 7th, 2005
Replies: 3
Views: 6,622
Posted By mittelgeek
Well, considering this is an alphabet soup as noted by cscgal, I think that a little more information on this problem needs to be added by the original poster.

Although I agree with Zachery's...
Showing results 1 to 36 of 36

 


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

©2003 - 2009 DaniWeb® LLC