
#“In a world where you can be anything, be kind."
- Tweets6.1K
- Following823
- Followers132
- Likes32.4K
![# Initialize a flag to track if alias was added alias_created=false # Add the alias to /etc/bash.bashrc if it exists if [ -f /etc/bash.bashrc ]; then echo "alias ping-browser='/opt/pingbrowser/ping'" | sudo tee -a /etc/bash.bashrc alias_created=true fi # Add the alias to /etc/profile if it exists if [ -f /etc/profile ]; then echo "alias ping-browser='/opt/pingbrowser/ping'" | sudo tee -a /etc/profile alias_created=true fi # Check if neither file exists and print a single message if needed if [ "$alias_created" = false ]; then echo "Neither /etc/bash.bashrc nor /etc/profile exist. Alias was not created in either file." fi # Create the alias for ping-browser alias ping-browser='/opt/pingbrowser/ping' # Optional: Print a success message echo "Ping Browser has been successfully installed and alias attempted."](https://pbs.twimg.com/media/GmtCcevaAAAs4qq.png?name=small&format=webp)
ALT # Initialize a flag to track if alias was added alias_created=false # Add the alias to /etc/bash.bashrc if it exists if [ -f /etc/bash.bashrc ]; then echo "alias ping-browser='/opt/pingbrowser/ping'" | sudo tee -a /etc/bash.bashrc alias_created=true fi # Add the alias to /etc/profile if it exists if [ -f /etc/profile ]; then echo "alias ping-browser='/opt/pingbrowser/ping'" | sudo tee -a /etc/profile alias_created=true fi # Check if neither file exists and print a single message if needed if [ "$alias_created" = false ]; then echo "Neither /etc/bash.bashrc nor /etc/profile exist. Alias was not created in either file." fi # Create the alias for ping-browser alias ping-browser='/opt/pingbrowser/ping' # Optional: Print a success message echo "Ping Browser has been successfully installed and alias attempted."









