I'm trying to compare 2 values in my script. Problem is, one is a string and the other is an integer. Can anyone give me an example of how you would convert a string to an integer on linux inside a shell script?
I checked all of the crons, and the only thing listed was cron.daily doing a backup of the rpm db. I checked into that, and that wasn't it, because that's only supposed to run when the rpm db changes.
I am running suse sles 8 (virutal servers), and there is an rpm process that kicks off about once a week at 1am, and runs for an hour. This process uses a large chunk of the cpu, but I can't find where it starts from. I don't see it in cron. Here is the line from top
7229 root 20 1...
That's a good idea, too. I definately didn't think of that one. I decided to just use case statements, and limit it to one of syslogs that can be kept online, after that, they get archived. I think I'll try some logic with the find command, though. Maybe that'll find it's way into the next...
Thanks for the reply, however, that's how I originally had it done. Now, they don't want to go by 60 days, they want it keyed off of the month. So, 60 days won't work for me because of February only being 28 days, and also the 31 day months.
I'm writing a script to rotate our syslogs. It used to be done by days, but now they want to keep 2 months online. So, for instance, if it's April, we'll archive February's logs. My problem is that I'm not sure how to manipulate the Month string from the date command, so that in January, and...
I'm not sure exactly why it happened. I haven't seen anything like this on a fresh install. However, we had two NICs in the machine, and it did it to both of them. They work fine now. Beware of the upgrade!
I found a way to disable IPv6, and it worked fine. I was then able to use Yast Online Update to upgrade the packages and cure some other instabilities. A word of advice to you linux users out there. Don't upgrade! Backup your data, do a fresh install, and the restore your settings and...
I just did an upgrade from SUSE 8.2 Pro to SUSE 9.1 Pro. After the upgrade, the network card failed to autostart. If I run the command "ifconfig eth0 up" the interface comes up, but no ipaddress is listed. If I configure the interface manually, "ifconfig eth0 10.10.210.15 netmask...
I found the answer. I didn't really see it on the link you sent me, but thanks for that. You're right, that's a very informative site. The solution was basically to seperate your commands by and &. So, to do what I was trying, the command would look like this..
FOR /F "tokens=1,2,3*...
Hello, I'm trying to write a .bat file that will copy a file to several directories based off of a file called commands.txt. On unix, I would just do this using a for loop. I'm new to .bat scripting and it seems to me that you can only pass one command at a time to the for command. Is this...
Thanks for the replies. Sedj, that's what I was thinking, sorry about my "wording", but that's the answer I was looking for. Thanks for the quick response!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.