in reply to Working with the log files

manu_06:

You don't tell us what problem you're having, so in the absence of details, I'll point you to: mkdir. If you give enough detail, you may get a better answer.

(See Ask questions the smart way, I know what I mean. Why don't you? and How (Not) To Ask A Question for information on writing good questions.)

...roboticus

Replies are listed 'Best First'.
Re^2: Working with the log files
by manu_06 (Novice) on Sep 20, 2010 at 20:01 UTC
    Hi,

    My problem is I need to create directory where the name of the directory should be name of the current directory it is reading files from. So I am stuck with how to do this. I know I could use mkdir but not sure how to get the dir name:

    Directory structure: Main directory/sub directory/ folder 1 , folder 2... After reading the files from sub directory it should generate a output as sub directory/log.txt right now my script is creating only log.txt.

      So, are you saying you need to get the name of the Current Working Directory (cwd)?

      Or do you just need to remember which directories you have moved through, in which case a simple array used as a stack would do?

        I need to get the name of the current working directory and create a new directory with that name and place my log file in that directory.