Mouseover script help?

Can you help me find this shell script?

  • Several years ago, I created a shell script (or Bash or I don't know what) that establishes a secure shell proxy connection to my home router when I type a short command into Mac OS X's Terminal. Now, I need to edit that script, but I can't find it for the life of me. I've tried searching on likely names looking at both visible and invisible files. I've tried searching for content that I know must be part of the script, but nothing comes up. Rather that executing a command, is there a way to open it in a text editor or display the actual script if I don't know the location of the file on my computer? Is there any other way I could go about finding this? Is there a location that whatever guide I was following would have suggested I save this script? I tried looking in usr/bin but nothing in there seems likely.

  • Answer:

    If it is short, it could be an alias - 'alias' from the command line should list it

willnot at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

If you're looking for where the alias is defined, it's probably in one of the following text files: ~/.profile ~/.bash_profile ~/.bashrc ~/.bash_login /etc/profile

ryanrs

Shell scripts are text files. If you're using OS X, text file contents are usually indexed, which means you can click on the Spotlight menu item and search on a keyword that would be inside the file. A hostname might be a good, relatively unique part of any text file on your computer, and therefore might make a good search keyword.

Blazecock Pileon

It was an alias. Thank you.

willnot

Just for future reference, to find a location of a script (or any executable), you can use the "which" command. Eg: "which ls" tells me that it's found in "/bin/ls", and "which ack" yields "/Users/vasi/bin/ack". You can see the different places it's looking for scripts by typing "echo $PATH", they're listed separated by colons. If you're using the bash shell, which is the default on OS X, there's an even more useful command, "type -a". If you have multiple scripts with the same name (in different paths), it will show all of them. It will also find aliases.

vasi

If it's OS X, just open Spotlight (Command-space bar) and start typing some fragments of the commands.

wenestvedt

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.