14 Posted Topics
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} EOF I keep getting the literal output of "${WHATIS}. I did this ages ago but … | |
Re: 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). … | |
Re: 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. John | |
Re: 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> | |
Re: Ubuntu does not use RPM packages...It uses DEB packages and you can install with: sudo apt-get install mysql-server | |
Re: I think the answer to your underlying question is that no, you can not have an email address of <something>@<your.IP.address>. You need to have a domain name to run an email service. Plus, if I received an email with an IP address instead of a domain name, I would not … | |
Re: 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. John | |
Re: 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. | |
Re: for i in `ls` do LC='wc -l ${i} | cut -d\ -f1` let COUNT=${COUNT}+${LC} done echo ${COUNT} | |
Re: 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: answ=0 until [[ $answ -gt 0 ]] do ps -ef | grep wget | grep -v grep answ=$? done (You will want to modify … | |
Re: 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: PATH: r:\\QW\${BUILD} Not sure where the BUILD number comes or how/if variables are created/used in Windows … | |
Re: 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 … | |
Re: 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 … | |
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 … |
The End.