Thanks Rudic and scrutinizer for quick response.
Actually i want to export the each file creation date and time to a static files.i.e the existed excel file will have the data already and the date and time will add to the excel sheet.
Exceldata.xls
column1 column2 column3 column4 column5
EMEA root Oct 2 12:26
APAC Aim Nov 29 18:40
Column1 is static the rest of the columns are dynamic.
total 0
drwxrwxrwx 1 pvs pvs 0 May 13 12:27 TestMurex
drwxrwxrwx 1 pvs pvs 0 May 13 12:29 20130614
drwxrwxrwx 1 pvs pvs 0 Jun 13 08:43 Markt3
drwxrwxrwx 1 pvs pvs 0 Jun 13 09:22 Markt2
drwxrwxrwx 1 pvs pvs 0 Jun 13 09:22 Markt1
drwxrwxrwx 1 pvs pvs 0 Jun 14 15:01 Markt
drwxrwxrwx 1 pvs pvs 0 Jun 24 10:59 ..
-rwxrwSrwx 1 pvs pvs 0 Jun 24 11:07 Inputdata.txt
drwxrwxrwx 1 pvs pvs 0 Jun 24 11:07 .
Output Obtained: OutputObtained.xls
Column1
drwxrwxrwx 1 pvs pvs 0 May 13 12:27 TestMurex
drwxrwxrwx 1 pvs pvs 0 May 13 12:29 20130614
drwxrwxrwx 1 pvs pvs 0 Jun 13 08:43 Markt3
drwxrwxrwx 1 pvs pvs 0 Jun 13 09:22 Markt2
drwxrwxrwx 1 pvs pvs 0 Jun 13 09:22 Markt1
drwxrwxrwx 1 pvs pvs 0 Jun 14 15:01 Markt
drwxrwxrwx 1 pvs pvs 0 Jun 24 10:59 ..
-rwxrwSrwx 1 pvs pvs 0 Jun 24 11:07 Inputdata.txt
drwxrwxrwx 1 pvs pvs 0 Jun 24 11:07 .
Here i am getting the output in single column(column1)
Output required : OutputRequired.xls
Column1 Column2 Column3 Column4 Column5 Column6
IND INR May 13 12:27 TestMurex
IND INR May 13 12:29 20130614
IND INR Jun 13 8:43 Markt3
US USD Jun 13 9:22 Markt2
EUR EUR Jun 13 9:22 Markt1
EUR EUR Jun 14 15:01 Markt
AUS AUD Jun 24 10:59 ..
GBP GBP Jun 24 11:07 Inputdata.txt
GBP GBP Jun 24 11:07 .
In my out put file already first two columns will have the data before script triggered,All i need is to place the script out put in 3rd,4th,5th columns in excel sheet.
What be so difficult in using code tags as required?
If I interpret correctly what you say, those country/currency entries already exist in output.xls. Be aware that correlating file entries based on just line numbers may be dangerous as a missing line will corrupt your results. Anyhow, try sth like (untested):
But her the out put is going in to single column in excel,i need each word should place in each cell of the excel say in A1 cell Column1 and B1 column2 .....etc and in A2 cell IND,B2 cell INR ...etc.
One option is to just copy-paste the ls -ltr output into excel, it gets pasted into a single column (with a selection band around it). Without doing any else, just go straight to the menu and choose data -> text to columns -> delimited -> and select space and tab as separator and select treat consecutive delimiters as one and then choose next and finish. If there are no spaces in your file names then the ls output should land nicely in seperate columns.