Skip to main content
Tweeted twitter.com/StackUnix/status/963706491969720320
edited body; edited tags; edited title
Source Link
derobert
  • 113.3k
  • 20
  • 242
  • 289

If condition for Shell What does "${line#*'Caused By'}" != "$line" mean in a shell script?

Can someone explain what this means in Shell scriptinga shell script?

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then echo "Yes" fi done 

If condition for Shell

Can someone explain what this means in Shell scripting

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then echo "Yes" fi done 

What does "${line#*'Caused By'}" != "$line" mean in a shell script?

Can someone explain what this means in a shell script?

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then echo "Yes" fi done 

Can someone explain what this means in Shell scripting

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then   echo "Yes" fi done  

Can someone explain what this means in Shell scripting

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then 

Can someone explain what this means in Shell scripting

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then   echo "Yes" fi done  
Reformatted and completed
Source Link

Can someone explain what this means in Shell scripting

while read -r line    do   if [ "${line#*'Caused By'}" != "$line" ]]; then  

Can someone explain what this means in Shell scripting

while read -r line    do   if [ "${line#*'Caused By'}" != "$line" ] 

Can someone explain what this means in Shell scripting

while read -r line do if [ "${line#*'Caused By'}" != "$line" ]; then  
added 4 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239
Loading
Source Link
Loading