How can I code a Python script that accepts a file as an  argument and prints its full path?  E.g.  ~/.bin/python$ ls ./        ../        fileFinder.py        test.md ~/.bin/python$ py fileFinder.py test.md /Users/theonlygusti/.bin/python/test.md ~/.bin/python$ py fileFinder.py /Users/theonlygusti/Documents/Online/theonlygusti.github.io/index.html /Users/theonlygusti/Documents/Online/theonlygusti.github.io/index.html   So, it should find the absolute path of relative files, test.md, and also absolute path of files given via an absolute path /Users/theonlygusti/Downloads/example.txt.  How can I make a  script like above?
How do I check whether a file exists or not, without using the  statement?
I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate. Partition on sublists beginning with a certain marker elements How do I determine the shutter count on a EOS 60D body? Run VirtualBox in background, without a window? Bibliography contents (Journal names) not abbreviated even with IEEEabrv I am using the following syntax, with no errors or warnings. However, the journal names are still not abbreviated. I compiled the file numerous times, as well as the bibliography. Everything compiles with no errors.  The syntax:   \bibliographystyle{IEEEtran} \bibliography{IEEEabrv,references}   Additional info: I am using BibDesk and TeXStudio on a macbook.  Do you have any idea what might be the issue? and how to solve it? Thank you.  Edit:  Example entry from the IEEEabrv file:  @STRING{IEEE\_M\_COM        = "{IEEE} Commun. Mag."}   Example entry from my references file:  @article{dai:2015,     Author = {Test, T.},     Journal = {IEEE\_M\_COM },     Month = {September}     } I recently upgraded to Ubuntu 13.10, with the new keyboard handling system. The little "switch keyboard" option does not let me set it to Alt+Shift. How can I get this keyboard binding, as I have absolutely no interest in using the Mac-esque Super+Space combo? How to add spacing between columns? Word style "keep with next" except on last item Can I convert flat bar to drop bars on a hybrid bike Photon energy - momentum in matter $E = h\nu$ and $P = h\nu/c$ in vacuum. If a photon enters water, its frequency $\nu$ doesn't change. What are its energy and momentum: $h\nu$ and $h\nu/c$ ? Since part of its energy and momentum have been transferred to water, it should be less.  If water's refractive index is $n$, are the energy and momentum equal to $h\nu/n$ and $h\nu/c/n$ ? Particular nodes are missing from node editor I am looking for the  but it is not available under the Vector nodes menu or any other menu. I have Blender 2.77 which cooresponds with the manual version in the above link.    I also cannot find the Texture Coordinate or Gradient Texture.  Likely I am doing something wrong. What does = +_ mean in JavaScript How do I divide a circle into equal parts like a pie chart with Adobe Illustrator? Is there a fairly simple way to divide a circle into equal parts using Adobe Illustrator CC? Search using symbols is broken We used to be able to , but that now appears to be broken.  I'd expect a  to return a result, but instead the search engine appears to put quotes around the whole request; the search box shows the search has been replaced with "[python] += list" and the  I was looking for doesn't appear among the returned questions.  Using quotes around the symbols do not seem to help here;  returns an empty result. hide div if clicked outside of it How can I change Blender's theme? I just downloaded blender and its very bright. I want it darker. How can I change the color of it? Given the sentence:     Most people who live and work near Washington, DC, would have trouble      imagining dinosaurs walking around the area.   Grammatically, what would ‘imaging’ be called in this case? Present participle or gerund or something?  I mean, if it is a present participle, ‘imagining~’ might be a description of the subject. And if it is a gerund, ‘imagining~’ might be an object of the verb phrase of ‘have trouble’. How do they explain this ‘imagining’ after ‘have trouble’? Adding values to a picklist using apex Allow deleting a tag wiki or excerpt Sometimes a tag wiki excerpt or body ends up with unacceptable or useless content: plagiarized text that must be removed, or a totally unhelpful dictionary definition. (For example:  — and I've seen this situation many times before.)  The only way to get rid of that content is to submit replacement text that meets the minimum length requirement. This is not always easy as writing a decent wiki, and especially a decent excerpt, requires subject knowledge.  Currently the users or even moderators who are alerted to unacceptable content in a tag wiki cannot remove that content without providing their own, which they are not always in a position to do. Yet these wikis would be better off with no content than with either unacceptable or unhelpful content, or some content written by a non-expert in a hurry.  Please provide a way for users to blank a tag wiki excerpt or body. I'm not sure what the reputation requirement should be: same mechanism as for tag wiki edits (suggested edits with approval), or only done directly by a user with the trusted user (20k) privilege, or moderator-only. Prove that $\lim_{x \to +\infty} \frac{f(x)}{x} = L$ if $\lim_{x \to +\infty} [f(x+1) - f(x)] = L \space$ Let $f:[0, +\infty) \rightarrow \mathbb{R} $ be a bounded function in each bounded interval. If $$\lim_{x \to +\infty} [f(x+1) - f(x)] = L$$ then $$\lim_{x \to +\infty} \frac{f(x)}{x} = L$$   I tried using the definition on the first limit; then, I attempted to use that inequality to apply the triangular inequality to arrive at the definition that gives me the second limit. It is supposed to be simple, but I'm not feeling safe as in how I should write it.