Skip to content

Commit ca1ba46

Browse files
authored
Add files via upload
1 parent f4fac7e commit ca1ba46

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

host_ip.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Check if an IP address is provided as an argument
4+
if [ "$#" -ne 1 ]; then
5+
echo "Usage: $0 <IP-Address>"
6+
exit 1
7+
fi
8+
9+
# The file to be modified
10+
FILE="SyShell_executer.py"
11+
12+
cp "$FILE" "$FILE.bak"
13+
14+
# Replace the IP address at line 26
15+
sed -i "26s/.*/host = '$1' # HOST MACHINE IP/" "$FILE"
16+
17+
echo "IP address updated in $FILE."

0 commit comments

Comments
 (0)