Skip to main content
1 of 3
Praveen Kumar BS
  • 5.3k
  • 2
  • 11
  • 16

Tested with sed command and worked fine

command:sed -r "s/^\s+//g" filename|sed '/^\/\*.*\*\/$/d'

output

sed -r "s/^\s+//g" filename|sed '/^\/\*.*\*\/$/d' 
printf("It is /* Comment 2 */\n");
x = 5; /* Comment 3 */
/* Comment 5 */ y = 0;
Praveen Kumar BS
  • 5.3k
  • 2
  • 11
  • 16