Command not found when adding third parameters to a shell script Being on Ubuntu Server I am trying to write an automation script.  Here is what I have:  #!/bin/bash  while [ "$1" != "" ]; do     case $1 in         -p | --port )           shift                                 PORT=$1                                 ;;         -d | --domain )         shift                                 DOMAIN+=("$1")                                 ;;         -l | --location )       shift                                 PATH=$1                                 ;;         * )                     exit 1     esac     shift done  echo "Parsing finished. List of domain is: " for val in "${DOMAIN[@]}"; do     echo " - $val" done  echo "Generating -d domain list..." for val in "${DOMAIN[@]}"; do     domains="$domains -d $val" done  echo "-d list is: $domains"  echo "Port is: $PORT."  echo "Location to save is: $PATH"  certbot certonly --standalone --standalone-supported-challenges http-01 --http-01-port $PORT $domains --cert-path $PATH   When ran with just two parameters, it works correctly. When I specify the third parameter -l or --location, it gives:  cert-ggm.sh: line 35: certbot: command not found   I tried to rename the -l parameter to capital P, got the same result. The test echoes return correct value parse. What's the deal with the location parameter casting certbot command uncallable? Thank you in advance.
running a bash file states:date: command not found I've installed a version of Ubuntu Server and although I'm fairly still fresh with Ubuntu, I'm trying to create a bash file to run a program in the background. More importantly, I'm trying to get a file nameto display correct and create it before I start running the program (I like my debug stuff).  However, here is my bash script:    #!/bin/bash  PATH="/var/log/servers/Game/"  FILENAME="startup"  EXT=".log"  DATE=$(date +%d-%m-%Y)  NEWFILE=${PATH}${FILENAME}_${DATE}${EXT}   I have verified that the file does exist in the PATH directory. However, the issue is with the date command. When I run the script bash -x game.sh this is what is displays.   + PATH=/var/log/servers/Game/  + FILENAME=startup  + EXT=.log  ++ date +%d-%m-%Y  game.sh: line 5: date: command not found  + DATE=  + NEWFILE=/var/log/servers/Game/startup_.log  + echo /var/log/servers/Game/startup_.log   I don't understand why it would say the command doesn't work, when I can go to the main console and run date and get a valid response.  Any help is greatly appreciated!
SSH access to office host behind NAT router I would like to access the ssh port of my office linux host from home. Unfortunately the host is located behind a NAT router. So, the IP address is not publicly available. There is however access to another internet host (Server) which is unfortunately only non-root access. After a while of searching I do not find a suitable solution.  Following setup:   Office PC (linux, root access) behind NAT (IP not public) but full Internet access. Server PC (linux, no root access) static and public IP and full Internet access. Home PC (linux, root access) behind NAT (IP not public) but full Internet access.   Possible connections: Office PC --> Server &lt;-- Home PC  Not possible: Office PC &lt;-X- Server -X-> Home PC  Neither the Home PC, nor the Server can initiate access to the Office PC. But both the Office PC and the Home PC can initiate connections to the Server.  Reverse SSH tunnel not possible: I tried a method called reverse ssh-tunnel. Unfortunately this requires GatewayPorts on Server set to "yes" in /etc/ssh/sshd_config, where I have no root access.  In principle it should be possible:   0) On the Server I start a userspace program which listens on 2 ports (1 incoming, 1 outgoing)  1) On my office PC I run a another program which keeps a TCP connection open to the outgoing port on the server.  2) From home I connect to Server's incoming port.  There should be a standard solution for this out there.  What is the quickest and cleanest solution to solve this?  Frank Is there an easy way to limit user bandwidth usage? I've working LDAP authentication with the following setup   AuthName            "whatever"  AuthType            Basic  AuthBasicProvider   ldap  AuthLDAPUrl         "ldap://server/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=company,DC=local?sAMAccountName?sub?(objectClass=*)"  Require ldap-group  CN=MySpecificGroup,OU=Security Groups,OU=MyBusiness,DC=company,DC=local   This works, however I've to put all users I want to authenticate into MySpecificGroup. But on LDAP server I've configured that MySpecificGroup also contains the group MyOtherGroup with another list of users.  But those users in MyOtherGroup are not authenticated, I've to manually add them all to MySpecificGroup and basically can't use the nested grouping. I'm using Windows SBS 2003.  Is there a way to configure Apache LDAP to do this? Or is there a problem with possible infinite recursion and thus not allowed? Why is everything floating in space so cold? Of course there is pretty hot stuff too. For example Suns.  But isn't the vacuum of space the perfect containment for heat? And shouldn't the rare collision with particles even heat up an object that floats around in space?  Why aren't they hot from time to time? Is it because they loose their heat by radiant heat?  And if so does radiant heat emission always occur until the object is the same temperature as the surrounding or does it depend on other factors? Find the equation of the plane knowing that it passes through 3 points Enable replace image feature in LibreOffice Equivalence Relation problem Let $S$ be the relation on $\mathbb{N} \times \mathbb{N}$ defined by $(a,b)S(c,d)$ if and only if $ad=bc$. Prove this is an equivalence relation on $\mathbb{N} \times \mathbb{N}$.  I think I've found this to be reflexive and symmetric, but I'm stuck on transitivity. Can someone check my work so far and assist with testing transitivity?  Reflexive: Let $(x,y)S(x,y)$. Then $xy = yx$. So $S$ is reflexive. Symmetric: Suppose $(a,b)S(c,d)$. Then, $ad = bc$. Therefore, $da = cb$ and $cb = da$. Therefore, $(c,d)S(a,b)$. Thus, $S$ is symmetric.  Transitive: Suppose $(a,b)S(b,c)$. Then $ac = bb$.   This is where I'm stuck. Any ideas? How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ? How to preserve bookmarks when rearranging pages of a PDF file with tools like pdftk? I am using pdftk to rearrange pages of a pdf file with bookmarks/outlines, but after that, the output file lost the bookmarks of the original.   My command is pdftk in.pdf cat 1-22 43 23-42 44-end output out.pdf.  I was wondering how I could keep the bookmarks while rearranging pages? Prove: $|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$ $$|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$$   I have tried: $$|a\sin x+b \cos x|\leq |a+b|\leq \sqrt{a^2+b^2}$$  enough to prove: $$|a+b|\leq \sqrt{a^2+b^2}$$  But I can find how to continue from here Winsock2's select() on fd 0 (stdin) fails How can I tell Ubuntu to do nothing when I close my laptop lid? How can I derive effect sizes in lme4 and describe the magnitude of fixed effects? Is every metric space a subspace of some connected metric space? If the space itself is connected then we're done, but if not then I think we can extend our metric space to make it connected.  I'm not sure whether this will work or not, but intuitively I think the answer is yes. What would happen if every person in the world gathered at a minimum possible area and jumped all at once? Would that have any effect on Earth? How can I produce a 'ring (or wheel) chart' like that on page 88 of the PGF manual? I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks. Proving $\prod \limits_{k=0}^{n}(1-a_k) \geq1- \sum\limits_{k=0}^{n}a_k$ Determinant of a special $n\times n$ matrix The AC adapter supplied with my laptop is designed to accept voltage in the range of 100-240VAC at 50-60Hz, but the AC cable that plugs into the adapter unit itself is only rated to 125VAC 7.5A 2.5A.  I know the adapter can accept 220V power, but is it safe to use this cable with the AC adapter to plug into a 220V socket?  Edit: The part in question is a 90W HP Smart AC Adapter.  The laptop does not cause the AC adapter to draw more than about 80 watts from the socket (as measured with a Kill A Watt meter).  Edit 2: The amperage rating of the cable as marked on the attached label is 2.5A, not 7.5A. How to sum 2 vectors in spherical coordinate system I have 2 vectors, and each defined by 3 coordinates: radius, azimuth and zenith How i can sum it? Help me pls guys. What i have done: I found azimuth and zenith of resultant vector, by decomposition to 2 polar vectors And it gave me 2 radiuses: radius of resultant vector for azimuth polar sum and radius of resultant vector of zenith polar sum. What can i do with them?