snehal.saini
Newbie level 6
Hi..
I'm working in primetime shell.
I have a variable like:
set x top/module/d
I want to convert this to top_module_d.
tried using "sed" command. But it is giving error when i search for "/". It works well for other characters like "_", "*","!" etc, but not with "/".
This is what i tried:
pt_shell> set x top/module/d
pt_shell> set p [sh echo $x |sed 's/\//:/g']
Error: sed: -e expression #1, char 5: unknown option to `s'
Use error_info for more info. (CMD-013)
Can anyone please suggest me a way out?
I'm working in primetime shell.
I have a variable like:
set x top/module/d
I want to convert this to top_module_d.
tried using "sed" command. But it is giving error when i search for "/". It works well for other characters like "_", "*","!" etc, but not with "/".
This is what i tried:
pt_shell> set x top/module/d
pt_shell> set p [sh echo $x |sed 's/\//:/g']
Error: sed: -e expression #1, char 5: unknown option to `s'
Use error_info for more info. (CMD-013)
Can anyone please suggest me a way out?