Skip to content

-bash: !/bin/bash: event not found when executing thunderbolt network configuration #1

@martinspaniol

Description

@martinspaniol

When executing this part of the TB network configuration:

https://github.com/taslabs-net/PVE9_TB4/blob/171f17a12389e3d815d9b951eceef5a7da59df47/02B-TB4-Network-Configuration.md?plain=1#L107C1-L107C12

I receive the error -bash: !/bin/bash: event not found. This is my code:

martin@Laptop:~$ for node in 192.168.3.11 192.168.3.12 192.168.3.13; do
  ssh root@$node "cat > /usr/local/bin/pve-en05.sh << 'EOF'
#!/bin/bash
LOGFILE=\"/tmp/udev-debug.log\"
echo \"\$(date): en05 bringup triggered\" >> \"\$LOGFILE\"
for i in {1..5}; do
    {
        ip link set en05 up mtu 65520
        echo \"\$(date): en05 up successful on attempt \$i\" >> \"\$LOGFILE\"
        break
    } || {
        echo \"\$(date): Attempt \$i failed, retrying in 3 seconds...\" >> \"\$LOGFILE\"
        sleep 3
    }
done
EOF"
  ssh root@$node "chmod +x /usr/local/bin/pve-en05.sh"
done
-bash: !/bin/bash: event not found

The file /usr/local/bin/pve-en05.sh will be created but without the Shebang at the beginning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions