A three things. First your first line (the she-bang) is incorrect. You should fix it.
Second, the section headers should be commented out.
Third, and most importantly, there is an error in exercise 1g.

(as this is a school exercise, I will let you find out how to fix these).

Although after 2 months, you should have completed this already

I have (roughly) the following code:

read -p "What is your variable: " WHATIS

cat > ./test.txt <<EOF

This should be a bunch of lines
I want this "variable" to be imbedded
it is ${WHATIS}


I keep getting the literal output of "${WHATIS}.
I did this ages ago but can not remember how or find the code I used.
Any help would be appreciated

Not really possible with BASH scripting. You would need something like expect or Python with pyexpect.
You could, however, use ssh keys which would not require a password, just an rsa key. Then you can use scp -i /path/to/key <Source> <Target>

That error is on the server that you are trying to download the file from. Essentially the permissions on the file (likely /var/www/html/getdownloadlink.php) are incorrect.
Unless you own the server you are downloading from, there is nothing you can do about it.

Ubuntu does not use RPM packages...It uses DEB packages and you can install with:
sudo apt-get install mysql-server

I think the answer to your underlying question is that no, you can not have an email address of something>@

Yes, more than likely there is a timeout set on the remote server for SSH connections. You can get around this by placing the following in ~/.ssh/config:
ServerAliveInterval 45
Which will send a "keystroke" to the remote server every 45 seconds.

Look at the Expect scripting language. Expect is an extension of the TCL scripting language. If your prefer, Python has the python expect module that you can use that is based on the Expect language.

for i in ls
LC='wc -l ${i} | cut -d\ -f1`
let COUNT=${COUNT}+${LC}
echo ${COUNT}

Good point...Sorry, I misread your post...

echo "PATH: r:\QW\${BUILD}" >> filename.txt

Is this a Windows Power Shell script?
You can create a variable with the BUILD number in it then use the variable in your PATH line. In bash the path line would look like:


Not sure where the BUILD number comes or how/if variables are created/used in Windows Power Shell...

I am guessing that you want all 3 to kick off at the same time then carry on once the last wget completes...
For that try:

until [[ $answ -gt 0 ]]
ps -ef | grep wget | grep -v grep

(You will want to modify the ps command to not output)
This will keep in the loop while the ps command finds a running instance of wget. Once wget ends and ps does not return anything then the script will continue.

Hope this helps...

When I think of a CSV file, I look for something like:

"Column 1","Column 2","Column 3"

You gave us:

  1. blog ==> [url]http://blog.example.com/[/url]
  2. site map ==> [url]http://www.example.com/site-map[/url]

Unless this is one column from your CSV file then it can be treated like a normal text file. It would be easier to work with then. I am also not sure if the csv module would even recognize this as a CSV file (if it does, can you use "==>" as the delimiter???). Because of the text between the number and the ==>, you would have a really hard time using spaces as delimiters...

2 things...First, and this will make life easier for what you want to do, you are NOT dealing with CSV files. These are plain text files which are easier to work with.
Second, I have been learning Python as well. I have spent (and in some cases wasted) money on several books. The 2 books that I have used most have been "Beginning Python, Using Python 2.6 and Python 3.1" (by James Payne, Wrox) and "Python: Essential Reference" (by David M Beazley, Addison Wesley). I start with the beginning book, read the first 3-4 chapters, then started writing and used the indexes of both to find things I need...I then ask here or other places if Google does not help.
I do know BASH scripting and have been trying to convert my knowledge to Python...

I use both but keep them separate.
I use LinkedIn to keep up to date with my professional network. I try not to have my current boss/co-workers as connections because I use it in my job hunting. Once I give notice at a job then I connect with co-workers.
Facebook is purely personal. I keep in touch with friends and family with it. I have gotten in touch with several old friends through it. Rarely to I have co-workers as friends on facebook. The only ones that are are people I actually like.
In both cases I am careful what I put on them. You never know who could be a friend of a friend - in FB especially.
As to which is better - Since I use each differently that is not a real comparison for me. If I had to give one up it would probably be FB. Linked In serves more of a purpose to me...

That worked much better. I have added some validation to it.
The purpose of the script is to allow a user to run commands via ssh on servers defined by fields 1-3 (field 0 being the server name) of the .csv file (I will be using pexpect module for the passwords where needed). In the case above, the menu picks out all the servers in a specific environment, next I want the user to be able to pick servers by use (i.e. Oracle, web server, tomcat, etc). To do this will I need to redefine v and recreate the menu or can I set the above as a function and pass the field number to the function to create the menu.
At the end I will list the servers by the environment, use, OS, and architecture (all 64 bit RHEL Oracle servers in QA for example).
A line from the csv file looks like "<server name>,TEST,Oracle_Server,Red_Hat,64".
I am also wondering if I should read the file into an sqlite database in memory. The csv file should not have more than 100-200 records.
I know I may be inventing the wheel here but, as I said, I am trying to learn Python and this seems a good way to start.

sergb - Thanks. That gave a few tips on how to convert the menu to a choice.
[Sorry, the code below is BASH code and not Python.]
To expand my question, is it possible to have a numbered choice that the user enters? I am looking for something similar to select/case in BASH:
[CODE]select use in Exit ALL Environment Description OS Architecture[/CODE]
produces the following:
[B]$ ./diskspace.sh
1) Exit 3) Environment 5) OS
2) ALL 4) Description 6) Architecture


Where the user chooses 3 and which uses the following BASH code:
[CODE]select type in "Exit" cat .servers.csv | cut -d, -f2 | sort -u[/CODE]
To output:
[B]I want to choose by Environment...
1) Exit
3) DEV
5) QA


Choosing 5 will perform action x on the first field of all the records than have QA in field 2.
I can see where the menu choices are dynamic based on the csv file but I want it to be dummy proof (for people like me) requiring only numbered input.
Eventually, the user will be able to pick choices from more than one category (like all Red Hat boxes in the QA environment) from the menu.

I have a csv file with 4 columns that I want to use to create menus.
For example, the second column has values such as "TEST", "QA", "PROD" and a couple of others. I want to take all the values from the second column, weed out the duplicates, then create a menu allowing the users to select all the records with, say, QA in the second column. How is the best way to go about this? (Later I want the user to be able to pick values from more than one column to pick selected records with)
Please keep in mind that I am very new to Python. I can do this in BASH with select/case construct but can not find how to do it in Python.