If you’re using curl with username and password frequently, consider writing a small script to handle the auth part. That way, you can keep your credentials in one place and call the script whenever needed.
Example:
```bash
#!/bin/bash
curl -u $1:$2 https://api.example.com
```
Save it as `api_call.sh` and run it like `./api_call.sh username password`.
Example:
```bash
#!/bin/bash
curl -u $1:$2 https://api.example.com
```
Save it as `api_call.sh` and run it like `./api_call.sh username password`.
