printing a directory structure

Hey everyone

I am just trying print a directory structure but I am not getting the desired output.

I am using AIX.

Script :

input file contains : TNP\\ECOM\\test\\1

input_file=folders.txt
cat $input_file | while read line
do
echo $line
done

Output:

TNF\ECOM        est\1

Expected output:

TNP\ECOM\test\1

any help?

If you just want the path in a variable, following should do the required

>:cat loc.txt
a//b//c
1//2//3
//bin//grep
//sys//power

Script

for i in `more loc.txt`
> do
> echo $i
> done

Output

a/b/c
1/2/3
/bin/grep
/sys/power
>:

Thank you for reply.

Could you please name one of the input as \\t and see what the output is.

its taking it as a Horizontal tab and shows space. that is my problem.

why are you using backslash in directory structure ?. And \t is generating a tab in your output.

your directory structure should look like
TNP//ECOM//test//1