1
vote
2answers
72 views

What is this specific shell script statement validating?

I'm not a good Shell Script expert. Can somebody help me to understand and explain the statement [ ! -z ${TRUE:-} ] && [ ${TRUE:-} == 'true' ] &&from the following snippet. What is ...
2
votes
1answer
98 views

Why can't I select from a table named range without using backticks?

I'm facing a problem with mysql. A query select * from range; works on mysql 5.0.22 but does not work mysql 5.1.61. but it works with backtick: i.e. select * from `range`; Kindly help in this ...
1
vote
1answer
352 views

BASH quoting for sudo su user -c

I need to run the following command: sed -i 's/^/command="\/bin\/false",no-agent-forwarding,no-pty,no-X11-forwarding, /' ~/.ssh/authorized_keys within sudo su user -c I think I've spent about 3 ...
0
votes
2answers
372 views

Please help me understand useradd example's syntax

I've been doing some research on how to add a user to the system so as to have a new ftp user and one of the examples I ran across was this: useradd -m -G users,ftp,wheel joe -s /bin/bash passwd joe ...
0
votes
1answer
889 views

Cannot move folder to a subdirectoy of itself - What's going on?

O.K I am trying to do the following very simple command and it is failing as follows... mv '/home/admin/Downloads/folder1' '/home/admin/MyLibrary/MyVideos/TV/folder1/' mv: cannot move ...
0
votes
5answers
4k views

Syntax error near unexpected token 'fi'

I have created a very simple script (see below) but cannot get it to run properly. I always get messages saying line 5: syntax error near unexpected token 'fi' line 5: 'fi' when I try to execute ...