sed -r -i -e "s/AppId/$a/" -e "s/AccessToken/$b/" FacebookApi > /script/newapp
By giving this command why the program is not getting executed can you solve this please ?
sed is an editor, not a shell interpretor. It execute SED instruction like subistitute for s/// but not batch or binary of other form (than sed instruction). Execution stay at calling shell level and management (like variable substition between double quote in a sed instruction string that is treated before sed receive the full instruction)
The command is executed. As you specified -i it is modifying the specified file in place (and not generating any output).
From the sed man page:
-i extension Edit files in-place, saving backups with the specified extension. If a zero-length extension is given, no backup will be saved. It is not recommended to give a zero-length extension when in-place editing files, as you risk corruption or partial content in situations where disk space is exhausted, etc.
As sed is directly modifying FacebookApi standard output will be empty (as the file /script/newapp)
-ior output redirection> /script/newapp.