Hi, i faced a problem while executing code in double quote "" and single quote ''
let say example, we type in manually:
>ls abc | grep "\.\/"
it works.
and when i implement this into my script.
$cmd1 = "ls abc | grep '\.\/'" #------> not working
$cmd2 = "ls abc | grep \"\.\/\" # same like previous.
Is my syntax correct ? Please advice. Thank you.
let say example, we type in manually:
>ls abc | grep "\.\/"
it works.
and when i implement this into my script.
$cmd1 = "ls abc | grep '\.\/'" #------> not working
$cmd2 = "ls abc | grep \"\.\/\" # same like previous.
Is my syntax correct ? Please advice. Thank you.
Comment