- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 24
- Posts with Upvotes
- 22
- Upvoting Members
- 21
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
159 Posted Topics
Re: Hi eddie! It's been a while since I've set up any ecommerce sites, but as far as open source stuff goes, opensourcecms.com has always been a good place to read and compare. Here's the link to their ecommerce section: [url]http://php.opensourcecms.com/scripts/show.php?catid=3&category=eCommerce[/url] I hope this helps! | |
Re: It sounds like you already have the Pi, but I got a cubieboard for this purpose because it has an actual SATA port. I've got a 1TB 2.5" drive, powered through the cubieboard (Just make sure your power supply is at least 2amps or better!). | |
Re: Seems like @rch1231 has what OP is looking for. Here's an alternative that I like, using the 'seq' command as the counter: #!/bin/bash while true; do for i in $(seq 1 20); do wget http://test.com done sleep 2 done I hope this helps! | |
Re: ITPT: Check out R1Soft (Idera Server Backup) or Crashplan. I don't know of any one piece of software that will do backups AND notify you of hardware changes on the client side, but if you want incremental or continuous backups scheduled from a central server, R1Soft is a good choice. … | |
Re: You could also just call the interpreter first. For instance, if we know that "$1" is a shell script: `/bin/sh $1` or `/bin/bash $1` I hope rohan1111 gets back to us about what the problem was. If the script really is essentially (as others have guessed) just: chmod 744 $1 … | |
Re: Apt is what makes Ubuntu (and Debian) awesome! You should be able to get MySQL running with a single command: `sudo apt-get install mysql-server mysql-client ` Unless there's a really good reason (like you need a specific version of mysql that isn't in the Ubuntu repository) I wouldn't install it … | |
Re: Most options for .bash_profile that are cross-platform compatible, though you may need to script something to detect paths for different OS's. What kind of profile options are you looking for? As far as OS detection, here's a link that should get you started: [Click Here](http://f00bar.com/blog/2011/07/09/simple-robust-os-detection-in-bash-using-ostype/) I hope this helps! -Jeo | |
Re: Siberian, do you still need help with this? What exactly are you trying to find out? Thanks! -G | |
Re: Hi! Do you have the 'bc' command, or 'printf' available in your shell? You should be able to convert values to and from different formats with one of those. All the information you need should be in the man pages, but let us know if you need examples. | |
Re: If you want to get data from a web page and do something with it, there are lots of good options. Depending on what you want to do, one of my favorites is wget. Here's an example: wget -qO- ipchicken.com This gets you the raw html from ipchicken.com. You can … | |
Re: Like Woooee suggested, cron is usually the best way to schedule something like this reliably. python does have a 'sleep()' function to make this easy though! Example: [code] #!/usr/bin/python import time while True: print "x" time.sleep(10) [/code] I hope this helps! -Jeo | |
Re: If you DO mean 'pylunch', you might want to start with their official documentation: [http://pylunch.googlecode.com/files/PyLunch-0.2.pdf](http://pylunch.googlecode.com/files/PyLunch-0.2.pdf) I hope this helps! | |
Re: Hidden files should be included in du output. I'm not familiar with ncdu, but I'm checking it out now! What do you get from this command: `sudo du -sh /` Thanks! -G | |
Re: I like to use 'tee' to print the results to the console AND to a file. Also, the "--color=auto" option to grep can help with readability of output, but I'm not sure how well it works in all shells when reading the results from a text file. Try something like … | |
Re: CimmerianX, are you some kind of masochist? That sounds like fun though! I'll bet you could get openvz running somewhere in there too. dihmen, I assume you are interested in using the built-in "KVM" (Kernel Virtual Machine) functionality in CentOS/RHEL 6. Here's a guide to setting up and running KVM … | |
Re: Hi! Try using the date command to generate the date for the filename. Something like this should work: zip -r forum_backup_$(date +%Y%m%d) ~/public_html/forum/* I took some liberty with the date format there. If you put the date first, then the month and day, it sorts nicely. You can re-arrange them … | |
Re: Hello Moe2! You may want to look into using [pam_passwdqc.so](http://www.techrepublic.com/article/enforce-strong-passwords-with-pampasswdqc/6111316). If configured correctly, it should tell the user what's acceptable when the passwd command is invoked. I hope this helps! -G | |
Re: Regex! Try something like this: var='96.33% from 120' decimal=$(echo $var|grep -Eo '[0-9]*\.[0-9]*') echo $decimal I hope this helps! -G | |
Re: I'm not completely sure, but I don't think you can use TLS over netcat. You'll need something to handle the SSL/TLS connection. It looks like you can do this with something like 'gnutls-cli' or even the 'openssl' client. This might be what you're looking for: [example using openssl](http://mikeberggren.com/post/1245298681/manual-tls-test) [example using … | |
Re: Hi voidyman! I'm not sure how you got those fonts in here, but it sure makes your post hard to read! A quick check of your script with 'perl -c' shows that the script (at least what you've pasted here) is missing a curly bracket at the end of the … | |
Re: Hello landog! I'm not sure exactly where that particular error comes from, but there are a couple of issues with this. First, when comparing integers you'll want to use the '-eq' operator. Use '=' to compare strings. I think '==' won't work in some shells. Second, your 'if' statement is … | |
Re: Cut works well for that! Or awk: echo $file | awk -F/ '{print $3}' You could also do something with sed... echo $file | sed -n 's%/media/\([^/]*\)/.*%\1%p' HTH! -G | |
Re: Neat! Do you want the date to be updated each time? In your code snippet, you run the 'date' command one time, so each entry will be the same date/time. Try something like this! #!/bin/sh for i in $(seq 1 600); do date |tee -a outputfile sleep 1 done Or … | |
Re: Hi MCLASS80! Have you got any sample data for us? What are you using to get the dump? Could we see that part of your existing script? From there, we should be able to help you figure out how to trim out the unwanted stuff. Thanks! | |
Re: Hello Rbezona! I think it might help if we could see the script that was used. I can't think of anything specific to ksh that would cause that behavior, but I'm wondering if perhaps each iteration was starting over from the beginning with a longer list of files... For instance … | |
Re: I wonder if adding the '-v' flag to your mv command would give you what you're looking for? Example: find /media/D_Drive/Music/ -name '*&*.*' -exec sh -c 'mv -v "$0" "${0%//\&/and}"' {} \; Aside from that, I think what I would end up doing is just using find to get the … | |
Re: Hi Sundown G! It looks like you've got the sum down pretty well. What have you tried for the max number, average and multiplication options? Multiplication should be fairly similar to what you're doing with the sum here (try something simple like `sum=$((sum*choice[a]))`, but make sure you set sum=1 before … | |
Re: Hello dwlamb! Without your exact example data it's hard to tell for sure, but I believe that bash expects the first parameter to be a variable, which means you can leave out the '$'. This simplified example seems to work for me, and might give you a better idea of … | |
Re: Hello Srikanth! This should be pretty easy in csh, depending on what utilities you have installed. Do you have 'wget', 'netcat' (nc) or 'curl' available in the shell? | |
Re: /etc/rc.local is a good place to put simple scripts that you want executed at boot-time. Lines in rc.local are executed as root (unless specified otherwise) and after all the other startup scripts have run. | |
Re: That's a good question! I don't think your sed line is going to work, unless each record is all on one line. The way the records appear to be formatted, your sort|uniq would give you a big pile of nothing. Here's a (kind of ugly) script that I wrote to … | |
Re: Hello Felipevd! The problem is actually pretty simple. When doing an 'if' comparison, you want to use square brackets [] instead of parens: [code]... if [ $Day="Monday" ]; then ...[/code] I noticed some other issues that you'll probably see after the if statement is 'fixed'. When you want to execute … | |
Re: I wonder what the solution was? :) I haven't used cygwin in a while. I'm curious to know what the problem was! | |
Re: If you are pasting into vi, you might try running ":set paste" in vi before hitting insert and pasting. | |
Re: Hi nakresimin! What kind of database? MySQL has a command line utility that allows you to execute database commands from a shell script. For instance, to delete all the rows in a table called bartable, in a database called dbfoo: [code] mysql dbfoo -e 'delete from bartable' [/code] Of course, … | |
Re: Hi sudhanshu! This should be relatively simple with a search/replace in sed. What have you tried so far? | |
Re: Hello Vikram! I'm sorry you've gone so long without a reply. The last time I used Solaris, most of my scripting was done with plain ol' bourne shell and bash scripting. I've always found the [url=http://tldp.org/LDP/abs/html/]advanced bash scripting guide[/url] at [url=http://tldp.org/]the linux documentation project[/url] to be a good reference, and … | |
Re: Hello iamthesgt! I'm sure there's some standard way to do this, but I don't know it. There are lots of pre-existing scripts out there that are similar to this one, but here's something I have been using for a while: [code] #!/bin/bash # Check for FreeBSD in the uname output … | |
Re: Hello Dark2Bright! I'm not sure what you're trying to do with 'verify' in this case, but the 'verify' command seems to be pretty specific: verify - Utility to verify certificates. Are you trying to verify a certificate in this 'if' statement? If not, what condition are you testing? Thanks! | |
Re: Hi Amar! You should be able to use Fedora's grub just fine. I don't think you can use the chainloader option unless you have Ubuntu's grub installed to the boot partition of the Ubuntu install (You say it was installed to the MBR before the Fedora installation) You will need … | |
Re: Hi BTW8892! Your script actually IS working! It's just that you're clearing the results immediately after :) After you accept input and execute the corresponding command, it loops back to the beginning, which starts with "clear" on line 6. Also, I'm not sure if this is intentional, but your actions … | |
Re: Hi itengineer7! This post is a little aged, so you've probably already figured this out by now, but it should be fairly simple to include logic that check to see if the script is already running, and exit if it is. That should PREvent concurrent runs. Here's one method that … | |
Re: Hi pennywise134! Did you ever get this sorted? If not, we're happy to help! Let us know what you've got so far and we'll see if we can give you a push in the right direction. | |
Re: Hi bossman5000! What have you tried so far? I can think of a few ways to do those operations. One of the simplest ways to get the lowest/highest values is to use 'sort'. There are a few ways to do the math as well. You can use something like 'bc', … | |
Re: This may be late, but I wanted to get the "column" command into the fight! [code] $ column -t -s " " test.txt aba bba baba abba baba baaa addd ffff fffff [/code] Hope this helps! -G | |
Re: Hi! It looks like you're off to a good start! Since it's homework, I won't make any suggestions about doing it a different way, but I can point out some things that I can definitely see that might trip you up in the troubleshooting process! First: when you want to … | |
Re: Looks like you're on the right track! Try using 'echo -e' In some shells, you might have to specify /bin/echo (or whatever your path is) rather than the 'echo' built into the shell. | |
Re: Hi gedas, This script takes the INPUT file as a command line argument using the "shift" function here: [icode]my $infile = shift;[/icode] The OUTPUT file name is also taken from the command line, OR generated by tacking on ".xls" on the end of the input filename: [icode] my $outfile = … | |
Re: Hello k2k! This is a perfect case for SED! You can use something like this to match the two lines with '#modify...' and 'hi()', and replace just that (those?) instances. Some googling will show you some examples that are close, but I didn't find anything that fit your issue exactly, … | |
Re: Hello aFg3! I'm not exactly sure what you're asking... Are you looking for a command line text editor, or are you looking for something along the lines of [icode]cat > file.txt[/icode]? |
The End.