Skip to content

Instantly share code, notes, and snippets.

@yazanmonshed
Last active November 30, 2023 08:39
Show Gist options
  • Save yazanmonshed/ed3924f43251cb8a23a3cf122adb8e77 to your computer and use it in GitHub Desktop.
Save yazanmonshed/ed3924f43251cb8a23a3cf122adb8e77 to your computer and use it in GitHub Desktop.
searching & update specific values in
#!/bin/bash
if [ -z "$1" ]; then
echo "Error: Please provide a value."
exit 1
fi
sed -i "s/OLD_VALUE.*/NEW_VALUE='$1'/" /path_the_files/file_name.yml
echo "NEW_VALUE updated to '$1' in file_name.yml file."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment