substring if statement variable shell script
#!/bin/bash
STR='GNU/Linux is an operating system'
SUB='Linux'
if [[ "$STR" == *"$SUB"* ]]; then
echo "It's there."
fi
if echo "$string" | grep 'foo'; then
echo "It's there!"
fi
string="My string"
#!/bin/bash
STR='GNU/Linux is an operating system'
SUB='Linux'
case $STR in
*"$SUB"*)
echo -n "It's there."
;;
esac
if [ $string ?? 'foo' ]; then
echo "It's there!"
fi
Also in C++:
- fish script set variable
- remove file from terminal ubuntu
- hyper-v mobylinuxvm primary ubuntu what is the login
- how to kill process ubuntu
- how to copy data from github server to another server
- git update gitignore
- how to check app is installed or not unity
- uninstall utorrent buntu
- laravel installer version
- linux convert files in folder
- raccourci tor browser sur ubuntu
- how to remove all images in folder mac terminal
- react native cannot load
- install java ubuntu
- powershell shared folder
- git overwrite local changes
- pyinstaller icon image
- install dvc in ubuntu
- install slurm debian
- Ubuntu packages
- enable virtualization mac pro
- how to uninstall wps office in ubuntu
- spring react
- create repository in github using command line