dokytree/samples/it_v1/item_builder/item.sh

13 lines
270 B
Bash
Raw Permalink Normal View History

2024-04-27 23:08:11 +00:00
#!/bin/bash
declare -r FILE=${1}
declare -r NUMSTART=${2}
declare -r NUMEND=${3}
declare -r NUM=${4}
declare -r NUMDIFF=$((NUMSTART + NUM - NUMSTART))
# Custom code
# sed -i "/^name:/c\name: 'crazy-${NUM}'" "${FILE}"
IP=$((230 + NUMDIFF))
sed -i s/YY/${IP}/ "${FILE}"