<commit_before>set -x

ip a

cat /etc/netplan/50-cloud-init.yaml

cat <<-EOF > /etc/netplan/50-cloud-init.yaml
# https://netplan.io/examples
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 192.168.2.201/24
      dhcp4: no
      dhcp6: no
      gateway4: 192.168.2.1
      nameservers:
        addresses:
          - 192.168.2.1
EOF

cat /etc/netplan/50-cloud-init.yaml

netplan apply

ip a<commit_msg>Update static-ip.sh<commit_after># wget https://raw.githubusercontent.com/linianhui/code/master/shell/ubuntu/static-ip.sh
# sudo bash static-ip.sh 201

set -x

IP=$1

ip a

cat /etc/netplan/50-cloud-init.yaml

cat <<-EOF > /etc/netplan/50-cloud-init.yaml
# https://netplan.io/examples
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 192.168.2.$IP/24
      dhcp4: no
      dhcp6: no
      gateway4: 192.168.2.1
      nameservers:
        addresses:
          - 192.168.2.1
EOF

cat /etc/netplan/50-cloud-init.yaml

netplan apply

ip a
{'fraction_non_alphanumeric': 0.12890625, 'fraction_numerical': 0.0771484375, 'mean_word_length': 2.1931464174454827, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2195889', 'n_tokens_mistral': 464, 'n_tokens_neox': 410, 'n_words': 78}