I have piece of Informatica code in a file as :
IIF(substr(flag,0,2)=1,false,IIF(flag= 1 ,0,NULL))
Please provide me with idea how to write a unix script which reads this file and write indented code into another file. The output in the second file should look as:
IIF(substr(flag,0,2)=1,
----false,
----IIF(flag= 1 ,
-------0,
-------NULL
-------)
---)
The same script should work for any number of IF loops and thus proper indentation should be taking place
------ denotes spaces
Thanks for the help in advance