Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

powershell if string contains

$strVal ='Hello world'
if($strVal -like '*World*') {
      Write-Host 'Your string contains the word world'
} else {
      Write-Host 'Your string does not contains the word world'
}
Comment

powershell if string contains

$strVal ='Hello world'
if($strVal -like '*World*') {
      Write-Host 'Your string contains the word world'
} else {
      Write-Host 'Your string does not contains the word world'
}
Comment

powershell string contains

PS C:> "abc", "def" -Contains "def"
True

PS C:> "Windows", "PowerShell" -Contains "Shell"
False  #Not an exact match
Comment

PREVIOUS NEXT
Code Example
Shell :: add staged change to your last commit 
Shell :: How do I show the changes which have been staged 
Shell :: bash get current date 
Shell :: device manager windows 10 run 
Shell :: how to install specific version of bootstrap using npm 
Shell :: how to upgrade docker-compose to latest version 
Shell :: add dns in ubuntu permanently 
Shell :: ubuntu ocamlfuse 
Shell :: checkbox github markdown 
Shell :: mui textfield disable autocomplete 
Shell :: install peer dependencies 
Shell :: fix dual boot time ubuntu 
Shell :: how to check if jenkins is running 
Shell :: how to uninstall atom in ubuntu 20.04 
Shell :: how to clear all the caches in ubuntu 
Shell :: install scikit-learn 
Shell :: black web browser github 
Shell :: see what is using a port ubuntu 
Shell :: change brightness ubuntu 20.04 
Shell :: mac install vagrant 
Shell :: timezone brasil postgresql 
Shell :: pods remove and reinstall react-native 
Shell :: how to install http-server globally 
Shell :: sudo apt-get -y install postgresql 
Shell :: update git using cmd 
Shell :: do-release-upgrade 
Shell :: linux resize image 
Shell :: shebang 
Shell :: how to download a repository as zip 
Shell :: convert to uppercase command awk 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =