vidyashankara Posted June 26, 2006 Share Posted June 26, 2006 I am calling the following system command[code]$command = "sed '1~3 {N;N;s/\n //g}' $biofile > $id.biomat1";s ystem($command, $output);[/code]for some reason, It changes to [code]$command - sed '1~3 {N;N;s/ //g}' $biofile > $id.biomat1";[/code]the /n is missing.I changed it to [code]$command = "sed '1~3 {N;N;s/\ ".\n." //g}' $biofile > $id.biomat1";s ystem($command, $output);[/code]but the php has a space between \ and n. How do i get rid of that space? Quote Link to comment https://forums.phpfreaks.com/topic/12949-special-characters-n-dissappers-in-command/ Share on other sites More sharing options...
wildteen88 Posted June 26, 2006 Share Posted June 26, 2006 \n creates a newline, do you want to us \n as-is, ie not make a newline, if you do then use this:\\n (two forward slashes)PHP will then use \n as-is, it will not convert \n to a newline. Quote Link to comment https://forums.phpfreaks.com/topic/12949-special-characters-n-dissappers-in-command/#findComment-49785 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.