shanenin
-
Content Count
3752 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by shanenin
-
-
that is pretty cool.
Thanks for the nice explanation.
@jcl, thank you also
-
mount | grep 192.168.1
if [ "$?" != 0 ];the first line of code will either output nothing, or output my nfs share containing that ip address. What does the second line of code do with that info? I understand it is part of an if statement, but I do not understand the condition.
-
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
that looks like a nice link, I will bookmark and reference that.
-
sure, that(echo) should have been obvious.
it seems if any functions are also names of commands in /usr/bin, the comand in /usr/bin is not used, in place of the newly made function.
edit aded later/
this post was made before your explanation
-
see your function nfs_mount. what if you have a command in /usr/bin that is also called nfs_mount? will that conflict with the function?
Just for to see what would happen I wrotw this function
#!/bin/bash
rm ()
{
echo "my first function"
echo
echo
echo "this is kind of cool"
echo sure_it_is
}
rmit worked fine, I thought that because rm was a command it would fail. With the function below I used the name echo, but it failed , WHY?
#!/bin/bashy
echo ()
{
echo "my first function"
echo
echo
echo "this is kind of cool"
echo sure_it_is
}
echo -
To be honest, programming is REALLY out of my element. I need to start from the beginning. I just ordered a used version of "sams shell programming" for $6.50 . I will need to work with that for a while before I start writing(or reading) scritps.
I found this program that should work well for what I wantt to do
-
I have two 200gb drives, on two seperate computers. I have all of my media duplicated on both harddrives. I add media to one of the drives. I want to make a script that will check what media has been added then copy the new media to my other drive via nfs.
I have never made more then three line bash script. These have always been as simple as three consecutive commands. This one will be a challenge, and hopefully fun :-)
The very first thing I would like the script to do is check to see if my nfs share is mounted, if it is not mounted mount it. I was thinking it could check the output of mount or the contents of /etc/mtab. For portability checking the output of mount would be better, because bsd does not use /etc/mtab. My thought was to pipe the output of mount to another command to seach for "192.168.1" . If it found "192.168.1" it could safely assume my nfs share was mounted(or not). Any suggestions on how to do this would be appreciated. Thanks.
edit added later/
maybe awk would be something I would need to use
-
Okay, maybe I'm missing something, but, I've only tried to use it once. Downloaded, installed the bittorrent client. When I ran bittorrent it "encouraged" me to donate 20 bucks to the founder which I didn't do. It wouldn't let me download ISOs bcause,I'm assuming, that I didn't pay for the client.
Maybe I downloaded the wrong one or it's mis-configured.
possibly misconfigured. As for donating, that is fully up to you. If you like the program and use it, it would be a nice suggestion to donate, but not required. I think even a small donation of $5.00 would be appreciated, $20.0 seems a little high(maybe I am just cheap).
-
I'll have to wait until ftp or Http access is granted as I haven't paid for bittorrent yet.
what do you mean paid for it? bitttorrent should be free
-
I think I am going to put iccaros-linux to the test. I will probably use it for my next gentoo build. I will let you know how gcc is working.
-
this mirror is real fast
http://acm.cse.lehigh.edu/mirrors/knoppix/...04-12-08-EN.iso
-
I just helped a friend make a video jukebox(freevo) running linux for his tv. We used direct framebuffer , with no X. It is playing movies perfectly(75% cpu load). Here is the cool part, it has only a 500mhz celeron and just 64mb of ram. It is not even using swap.
-
are you using catalyst for the gentoo build
-
I have been messing around with cgywin, it is pretty cool. It is a little strange how it does stuff. For instances it makes all files with a permsissions of 700(maybe my umask can be changed). So when I used scp to send over files to my other computer, only root could read them. I also had to place my ssh_config file directly is /etc/ for it to be read, instead of /etc/ssh. Overall it is pretty neat using bash and other gnu tools in windows.
-
you for got pkill to kill a process by name
I have always used killall to kill a process by name.
edit added later/
jcl, darn you beat me by 8 hours
-
not easy to install or easy to use..
I thought it was easy to install , but I also thought Gentoo was easy. every things seams easy after Linuxfromscratch..
more about the install. I had an easier time with gentoo's hand holding then with debains installer. I guess gentoos manual install left no room for error, it told you exactly what to do. I remeber doing more guessing while installing debian, not fully sure I was making the correct choices(the first time around)
-
debian is definately not easy, although the newer debain-sarge-net install is much easy then previous versions of debian.
I have always thought for a first try, a distro with an easy install, like Mandrake, is a good first choice.
-
have you ever concidered using an installer like anaconda? It seems very polished, why reinvent the wheel.
-
After about 5 days of working out bugs, I have a stable system(media player connected to my tv)). It is configured so my wife only has to press the power button once to start it, and once again to shutdown. it has a simple interface to use, which is controlled by a wireless keyboard.
http://freevo.sourceforge.net/ss/blurr/freevo_ss1_640.jpg
We just use it for music, movies, and tv shows that have been downloaded, to watch at our convience. Oh ya and PORN (just kidding my wife is not a big porn fan)
some of the specs
athlon 750 mhz 512kb cahce
matrox g450 (video card)
200 gb IDE harddrive
128 mb ram
19" beadroom tv
it is averaging about 30% cpu load and using about 100 mb of ram. In therory this would work on an 300 mhz athlon(if there is such a thing)
-
you definately do not need an antivirus, your system is pretty much immune to all windows virii, and there are not any linux virus to worry about.
Most popular distros come witha fire wall built in. You will just need to enable it.
-
I intrested and willing to crash a machine.
that is a good attitude. I am constantly breaking something, that is how you learn. If you are up to a challenge, start off with slackware. It is not overly hard, but for a first time user, it will be a challenge.
-
cool, thanks for clearing that up.
-
"AMD K7 750 Megahertz processor with 512 K cache"
I don't think the K7 had a harddrive limitation.. it uses LBA48
I did not realize that the proccessor had anything to do with harddrive limitation.
-
I would not prefer to spend 30 dollars on an ide card. If I purchase an oem drive, without software, am I pretty much screwed? what about flashing the bios to a newer verision, would that help?
if anyone cares to look, this is the link to the computer
http://support.gateway.com/support/srt/doc...p?sn=0018537998
Bash Script Help
in Programming
Posted
I took the plunge. I deleted my 150gb backup media directory off one of my servers. I am now using unison to make a replica of all of my media back to that server. If all gos well, tomarrow morning I will have two servers perfectly synced. Now if I make changes to either server, it will automatically update the other server. I am anxious to see how this all works out :-)