Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 1.54 KB

bash.md

File metadata and controls

46 lines (39 loc) · 1.54 KB

bash: Bourne Again SHell

commands

copy

  • copy directory: cp -R <source_folder> <destination_folder>
  • copy directory content: cp -R <source_folder>/* <destination_folder>

Resources

cURL(client URL)

Format JSON response from curl

Pretty Print JSON responses from curl

  • When you use curl to manually make API calls, sometimes the response is not formatted
  • You can pipe json_pp at the end so you have a prettier json response
$ curl 'https://til.hashrocket.com/api/developer_posts.json?username=gabrielreis' | json_pp

{
   "data" : {
      "posts" : [
         {
            "slug" : "mmzlajavna",
            "title" : "Display line break content in React with just CSS"
         },
         {
            "title" : "Mutations with the graphql-client Ruby gem",
            "slug" : "xej7xtsnit"
         },
         {
            "title" : "The rest of keyword arguments 🍕",
            "slug" : "o2wiclcyjf"
         }
      ]
   }
}