Forum: Shell Scripting Apr 23rd, 2009 |
| Replies: 3 Views: 1,321 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 @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 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 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 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 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 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 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 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 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 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 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 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 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 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... |