Here’s how to restore or set the Bash prompt on RHEL systems.
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc |
cloud engineer
Here’s how to restore or set the Bash prompt on RHEL systems.
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc |
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc
Here’s a bash script that creates a volume from a snapshot in AWS.
#!/bin/bash read -p "snapshotId : " snapshot read -p "server : " server read -p "tag1 : " tag1 read -p "tag2 : " tag2 read -p "region : " region read -p "zone : " zone read -p "profile : " profile aws ec2 create-volume \ --availability-zone $zone \ --encrypted \ --iops 3000 \ --volume-type gp3 \ --snapshot-id $snapshot \ --tag-specifications "ResourceType=volume,Tags=[{Key=Name,Value="$server"},{Key=tag1,Value="$tag1"},{Key=tag2,Value="$tag2"}]" \ --region $region \ --profile $profile |
#!/bin/bash read -p "snapshotId : " snapshot read -p "server : " server read -p "tag1 : " tag1 read -p "tag2 : " tag2 read -p "region : " region read -p "zone : " zone read -p "profile : " profile aws ec2 create-volume \ --availability-zone $zone \ --encrypted \ --iops 3000 \ --volume-type gp3 \ --snapshot-id $snapshot \ --tag-specifications "ResourceType=volume,Tags=[{Key=Name,Value="$server"},{Key=tag1,Value="$tag1"},{Key=tag2,Value="$tag2"}]" \ --region $region \ --profile $profile
Here’s a nice little command to open a browser from Bash.
#!/bin/bash open https://domain.com/path/to/web/page/index.html |
#!/bin/bash open https://domain.com/path/to/web/page/index.html
You can use this command to open a web page from your script.