-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promote to AIO repo v0.5.1-preview (#55)
Promote to AIO repo --------- Co-authored-by: Azure IoT Operations Bot <actionbot@azure.com> Co-authored-by: Nonso Chukwuogor <nonsochukwuogor@gmail.com>
- Loading branch information
1 parent
cd5e0a2
commit dbad9f2
Showing
5 changed files
with
109 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Set the directory path where the files are located | ||
directory="../samples/grafana-dashboards" | ||
|
||
# Set the placeholder string | ||
# <Placeholder_SubID> | ||
placeholder="<Placeholder_SubID>" | ||
|
||
# Prompt the user to enter the new string | ||
read -p "Enter the new string: " newString | ||
|
||
# Iterate over each file in the directory | ||
for file in "$directory"/*; do | ||
# Check if the file is not a directory | ||
if [ -f "$file" ]; then | ||
# Search for the placeholder string in the file | ||
if grep -q "$placeholder" "$file"; then | ||
# Replace the placeholder string with the new string | ||
sed -i "s/$placeholder/$newString/g" "$file" | ||
echo "Placeholder replaced in: $file" | ||
else | ||
echo "Placeholder not found in: $file" | ||
fi | ||
fi | ||
done |