emails="[email protected];[email protected];[email protected]" emails=${emails//;/ } #replace ; with space arr_emails=($emails) # put them into an array for item in ${arr_emails[@]}; do echo $item done In fact this works also. You don’t really need arrays emails="[email protected];[email protected];[email protected]" emails=${emails//;/ } #replace ; with space for item in $emails; do echo $item done But with using arrays, you can do many […]Read More
echo 'iweigh297lbs' | sed 's/.*[^0-9]\([0-9]\+\).*/\1/' The expression has to match the whole line. Greed: The expression will match the largest possible from left to right. This won’t work. echo 'iweigh297lbs' | sed 's/.*\([0-9]\+\).*/\1/' Output 7 This won’t work echo 'iweigh297lbs' | sed 's/.*[^0-9]\([0-9]*\).*/\1/' This works echo 'iweigh297lbs' | sed 's/.*[^0-9]\([0-9][0-9]*\).*/\1/' + has to be escaped. […]Read More
YOu need first add the chrome.exe directory to windows environment. [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Program Files (x86)\Google\Chrome\Application", "User")Read More
Add the following lines to crontab and then it will work: SHELL=/bin/bash PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesRead More