159 Posted Topics

Member Avatar for Gresakl

OR you could break it up into functions! Make each part of the script into a function, and you can go back to whatever function you want at any time. For example, you can turn that initial prompt into a function: [icode] prompt () { echo "Please enter a file …

Member Avatar for JeoSaurus
0
119
Member Avatar for neclark2

Hi Nick, We'll need a little more info to help you I think. You say you know about mysqldump, so I assume you just need to know how to script a mysql dump for each database? If that's the case, you can do something like this: [code] #!/bin/sh # First …

Member Avatar for JeoSaurus
0
157
Member Avatar for bimaljr

Usually we use the "mv" (move) command to rename a file. Try something like this! [code] #!/bin/sh for FILE in $(find . -type f -name '*4%3a*'); do NEWNAME=$(echo $FILE|sed s/'4%3a'//) mv -v $FILE $NEWNAME done [/code] If the files are all in one directory, you can run this from in …

Member Avatar for bimaljr
0
189
Member Avatar for yair7190

Try this! [icode] ps -C bash -o pid=,size | awk '{SUM += $2} END {print SUM}' [/icode] The problem is that your awk statement doesn't have a "print" command. You have to tell it what to print. I also took some liberties in my example, and used some built in …

Member Avatar for ghostdog74
0
120
Member Avatar for k2k

Hi k2k, There are a few options. Usually, if you're the root user, these things are in your "PATH". Are you by any chance logging in as another user, and using the "su" command to get to root? if so, try using "su -l". This will start a login shell, …

Member Avatar for DimaYasny
0
100
Member Avatar for punitdam

Okay, so this seems to be from 11 days ago. Have you gotten it resolved yet? I've seen this happen on AIX (I think it was) and it turned out to be a problem with a library that needed to be updated. May I ask why you're using compress rather …

Member Avatar for JeoSaurus
0
97
Member Avatar for k2k

Here's another problem: "however, the dyndns.com auto detector detects another ip, i have to manually change it to 192.168.1.5 so i can do ssh at home" dyndns is detecting your "public" ip address, which is the one that you would use to connect to your home network from the internet …

Member Avatar for k2k
0
112
Member Avatar for jasminselvaraj

Hi! I think Rad' meant to put quotes around the variable, like "$1". I don't think that's going to help though. This problem used to frustrate me so much! Okay, I'm not sure how this will translate to what you're doing because I don't know java, but I usually get …

Member Avatar for radoulov
0
147
Member Avatar for choco4202002

There are thousands of ways to do this one :) Try this! [icode] grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' /var/lib/output [/icode] Thanks! -G

Member Avatar for JeoSaurus
0
87

The End.