Useful CLI Examples

Linode Staff

Hi, this is Will, maintainer of the Linode CLI. I'm working on putting together some examples scripts and recipes to complement the existing documentation. What do you guys use the CLI for? Any use cases I should be sure to cover?

2 Replies

Hi @wsmith, I'm not sure if this idea applies to what you're asking for but I figured I'd give it a shot anyway. What I'd like have is a script that searches through each domain in the Linode DNS area that has an IP for an A/AAAA record and changes it to a new IP. Essentially a search and replace. This would be helpful in the case where you have a bunch of domains but need to migrate your Linode to a different datacenter which causes an IP change. Thanks!

Hey @wsmith,

I'm hoping to get some more in-depth examples of how to update a StackScript from the command line! I'm having issues with the CLI recognizing that my script does, indeed, begin with a shebang (I get a 400 error saying it doesn't have a shebang), but as I'm not able to find any other mentions of this issue online. I'm not sure how to correctly specify the script file to linode-cli as there are very few examples of using the command line utility for this purpose.

Thank you!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct