Advertisement
metalx1000

Create Valid JSON with jq

Jan 4th, 2025
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. read -p "User Name: " username
  4. [[ $username ]] || exit 1
  5.  
  6. read -p "Website: " site
  7. [[ $site ]] || exit 1
  8.  
  9. jq -n --arg username "$username" --arg site "$site" '$ARGS.named'
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement