Results 11 to 18 of 18
No problem with helping. I actually don't know much Bash myself, so it's a bit of a learning experience for me too. That's why I use Perl for everything .
...
- 11-25-2005 #11
No problem with helping. I actually don't know much Bash myself, so it's a bit of a learning experience for me too. That's why I use Perl for everything
.
Anyway, as far as that substring thing, no. Because you're doing (0,3), which, because 3 is exclusive, would return characters 0, 1, 2 ("tes"). You need to do "${word:0:4}".
Another way of thinking is that you start with the first number, and end right before the second number. So we start at 0, and end right before 4.DISTRO=Arch
Registered Linux User #388732
- 11-25-2005 #12Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
ok, cool. i got it
Originally Posted by Cabhan
thank you so much. i'm very close to getting it finished. now i just need to adjust the 2.6 section for 2.4, add if-then's for the bootloader that the person chooses, and add the code to add lines to the bootloader
- 11-25-2005 #13Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
ok...i finally finished writing it. i'm testing it now with a new kernel to see how it works and if there are any bugs
i'll start a new thread in "Linux Applications" with this program in it and what it does in detail tomorrow
thanks you very much for helping me write this
- 11-25-2005 #14Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
there was a small bug and i'm probably just going to avoid it. when it adds to grub/lilo, the entry is now placed too high (i didn't think about this earlier). it's added above the options at the top of the config files. so, i'll probably add it to the bottom instead and give the user the option of using the kernel if he or she wants by moving down to it...or maybe place it at the top but re-add the settings and make them the original grub/lilo defaults. i'm not sure yet. what would everyone rather have?
- 11-25-2005 #15Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
ok...i decided to just add the new kernel to the bottom of the grub.conf/lilo.conf file, as i don't think i'll be able to place it where i want it. oh well. i'll post the code in the "Linux Applications" section soon. how would you all recommend i post this so that people can easily use it? i was thinking about just posting the code, but that would come up to 331 lines of code
Originally Posted by josolanes
. is there a way for me to post just the program, to be dowlnoaded and readily executable?
- 11-25-2005 #16
Since I don't know Bash, I dunno if this is doable, but is it possible to read the file into an array until you reach the first actual kernel boot statement, then rename it, write the file that you read (the top statements) to the file, write the new kernel to the file, and then write the old one below that?
As far as posting the program, just put it online and link to it. That way, people can look at it and download it easily.DISTRO=Arch
Registered Linux User #388732
- 11-25-2005 #17Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
the first part confused me some, but i understand what you mean
Originally Posted by Cabhan
.
i don't know how to do arrays within bash....if i can find out how to, i would be willing to add that. it would make it a little bit easier to move from kernel to kernel (automatically would boot to it at restart). I found a nice site to look at regarding this (http://www.linuxvoodoo.com/resources...de/arrays.html) and am now reading through it to see how i would write the script
for posting the program, you mean use something like www.yousendit.com to host the file temporarily and post the link? that's the only way i know of doing this so far
- 11-27-2005 #18Linux Enthusiast
- Join Date
- Jun 2005
- Location
- Odessa, FL
- Posts
- 586
OK...i've posted the program in the Linux Applications section. It runs perfectly from what I can see and I hope it is of some use to you

Link to thread



