title: Bash import or export variables
body: <p>I am adding commands into my bash profile and am trying to make my code simpler and want to delete the extraneous duplicated code. I have export statements and I have the commands running correctly but I am trying to simplify my code. I am using the same exact code for my commands and want to make it into one file. I am running the commands on a Mac terminal. I have installed npm, atom, atom shell commands and am on Mac OS version 10.14.5.</p>
  
  <p>I tried changing the code structure around but I cannot figure out how to simplify and reuse the commands and make them into a function. The commands are duplicates of each other except that they are pointing to different file paths. I do not want to keep on reusing the same code and I am hoping to make it simpler but not sure how. </p>
  
  <pre><code>export snippet_project="/Users/kevinpleong/Desktop/my-programming-projects/snippet-creator-electronjs"
  
  export programmingprojects="/Users/kevinpleong/Desktop/my-programming-projects"
  
  export personal_website="/Users/kevinpleong/Desktop/my-programming-projects/personal-webiste"
  
  
  edit-snippet-creator() {
    cd /Users/kevinpleong/Desktop/my-programming-projects/snippet-creator-electronjs
    atom .
  }
  
  edit-personal-website(){
    cd /Users/kevinpleong/Desktop/my-programming-projects/personal-website/
    atom .
  }
  
  edit-programming-projects(){
    cd /Users/kevinpleong/Desktop/my-programming-projects/
    atom .
  }
  </code></pre>
  
  <p>I am hoping that it outputs the same thing as the bottom 3 blocks of code but I can simplify the code.</p>