1,791 reputation
29
bio website
location The Netherlands
age
visits member for 1 year, 3 months
seen 5 mins ago

Currently working as system administrator at Bizztravel B.V.. I've earned a bachelor degree in Computer Sciences. Since computing in general is my passion, I try to keep up with the latest development in this field. I'm active on irc.freenode.org and try to contribute to the open source community as much as I can.


Oct
10
comment Bash Mysql Command Substitution Login Failure
No problem, I'm not after getting credits really. I'm glad I could help. You can post my comment as answer an mark it as answer yourself.
Oct
9
comment shell for loop with find with filenames containing spaces
As I said, you don't need a for loop there. You have not explained why you'd need a for loop. Unless I'm not understanding your question.
Oct
9
comment Bash Mysql Command Substitution Login Failure
RESULT=$(mysql -u user -p "${PASS}" -h RemoteHostName DBName -e "select count(*) from TableName;") Will work as expected
Oct
9
comment shell for loop with find with filenames containing spaces
You rarely find a for loop and find construction together. I think you want something like find "$POLLDIR" -type f -mmin +1 -exec sh -c 'mv -- "$@" ./target' _ {} + You can use -name flag to specify different extensions etc. No need for the loop at all.
Oct
8
comment Covert a .tar file to .ext3
@peterph true! The -j option is wrong. That should be substituted to -f
Oct
8
comment Covert a .tar file to .ext3
I think he wants dd as in tar -jxv /path/to/rootfs.tar | dd of=/dev/sdX conv=sync,noerror bs=xxxK where bs=xxxK is the number you used to tar the root fs.
Oct
8
comment bash syntax error near unexpected token `(' - but everything looks like it should work
put a shopt -s extglob just before cp.. command and you'll be just fine
Oct
8
revised File tranfer from the server
removing username shown in answer.
Oct
8
suggested suggested edit on File tranfer from the server
Sep
24
awarded  Autobiographer
Sep
23
comment scp with password and renaming the file
@Vasu Then you'd need file="${1##*/}" Also don't use CAPITALS for var names.
Sep
23
comment scp with password and renaming the file
About todayDateVar It is unnecessary to use all that stuff. You'd just todayDateVar=$(date +%b_%d_%Y) at least if you want to achieve the same result. Also variable FILE.. what are you trying to do with it? Removing the slash?
Aug
27
comment Suppressing “sudo: sorry, a password is required to run sudo”
Normally that should have worked. See mywiki.wooledge.org/BashFAQ/… which explains everything about file descriptors including portability
Aug
27
comment Suppressing “sudo: sorry, a password is required to run sudo”
sudo -u other-user -n true 2>/dev/null sends standard error to nothing, null binary. A similar situation which I've described here: serverfault.com/questions/550107/…
Aug
26
comment find file, copy but with different name
If we used "$1" as you suggested, then we could use "${1%%[0-9]*}" as being the positional parameter without defining a variable.
Aug
26
comment find file, copy but with different name
@G-Man it indeed is 'explanatory'. I stand corrected. find when no path specified, assumes the $(PWD). So since I was not sure where OP's files were located I assumed the current dir. Then of course the command changes slightly. names${1##*/} would no longer be necessary. Just a way to show how PE (Parameter Expansion) works
Aug
26
revised find file, copy but with different name
First version is to remove extension.
Aug
26
answered find file, copy but with different name
Aug
23
answered Script to ssh and run a command doesn't work
Aug
22
comment ssh-keygen -y error: load failed
Let us continue this discussion in chat.