a shell script to generate an excel sheet from a text file..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting a shell script to generate an excel sheet from a text file..
# 8  
Old 06-14-2012
What about all the descriptive data? All in one field?
Code:
awk '$2 ~ /\. \[/{s=x; for(i=2;i<=NF;i++)s=s ($i~/\[|ph:/?OFS:x) $i; print s }' RS=\*  FS='\n' OFS='|' infile

# 9  
Old 06-15-2012
Quote:
Originally Posted by Scrutinizer
What about all the descriptive data? All in one field?
Code:
awk '$2 ~ /\. \[/{s=x; for(i=2;i<=NF;i++)s=s ($i~/\[|ph:/?OFS:x) $i; print s }' RS=\*  FS='\n' OFS='|' infile

thanks a lot buddy! but that didn't do the trickSmilie
thanks for the effort you put in..
i'l fiddle with it Smilie

---------- Post updated 06-15-12 at 01:48 AM ---------- Previous update was 06-14-12 at 04:12 AM ----------

Quote:
Originally Posted by Scrutinizer
What about all the descriptive data? All in one field?
Code:
awk '$2 ~ /\. \[/{s=x; for(i=2;i<=NF;i++)s=s ($i~/\[|ph:/?OFS:x) $i; print s }' RS=\*  FS='\n' OFS='|' infile


hey.. you modify that script to fit in the title in one field, description in one field, address in one field and ph in one and the website in one field!
sorry , but as a beginner i couldn't grasp much of it.. so!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

2. Shell Programming and Scripting

Need to convert text file into Excel sheet

:cool:Hi, Iam new to this Scripts and forum too. Plz excuse if may i ask silly questions now and further.. Prob: i need to convert txt files data into excel sheet. Suppose if i have hour-wise data in txt file1 and file2 like file1 file2 00: 140 00: 235 01: 160 01:415... (1 Reply)
Discussion started by: mrudula
1 Replies

3. Shell Programming and Scripting

Shell Script for copying text file to Excel Sheet

Hi, I want to write a program to copy a log file to Excel sheet. Excel sheet has four columns MethodName , Code , Description, Details and Time. I want to pick these info from text file and put it in excel sheet. here is how the text file looks - 04.17.2014 08:06:12,697... (1 Reply)
Discussion started by: hershey
1 Replies

4. Shell Programming and Scripting

Adding tab to excel sheet with shell script

(1 Reply)
Discussion started by: sagar_1986
1 Replies

5. Shell Programming and Scripting

Export data from database in Excel sheet with the help of Shell script and automated the report

Export data from database in Excel sheet with the help of Shell script and automated the report every day in the mornig. (1 Reply)
Discussion started by: neeraj617
1 Replies

6. Shell Programming and Scripting

Problem in formatting output of SQL query in excel sheet in shell script

Hi Guys.. Need your help to format the output of my shell script. I am using spool command to take out put in csv file. below is my code. (for example) col USERNAME for a15 col EMAIL for a30 col FULL_NAME for a20 col LAST_LOGIN for a40 col DATE_CREATED for a40 SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies

7. Shell Programming and Scripting

Attaching two text files in two different sheet in same excel

Hi, My requirement is to get attach two different text file contents to two different sheets in same excelsheet. Also, is there any way we can name the tabs as desired ? Kindly assist. (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies

8. Shell Programming and Scripting

Filter data in Excel sheet using Shell Script

Hi, I have an excel sheet which has 100000 records. All these records are having 3 columns each with the last column as "Y" or "N". I would like to filter those records which has the value "Y". Can you please let me know how to proceed with that? Thanks in advance. -Sri ----------... (8 Replies)
Discussion started by: bhanusri83
8 Replies

9. Shell Programming and Scripting

How to update existing excel sheet using shell script

Hi All, I am having an excel sheet with pre-defined format which our business team specified, what i need to do is i have to write a script which need to pick values from database and update specified cells in excel sheet.. can any one please help me in this regard.. I am able to pull the... (3 Replies)
Discussion started by: balanarendra
3 Replies

10. UNIX for Dummies Questions & Answers

Script to generate text file from excel file

Hello, I have a excel file which has almost ten columns on the shared drive. I have to write a shell script to ftp that daily to unix server and then extract some columns from there and generate oracle standard text file. The columns should be in proper order and aligned properly, otherwise... (1 Reply)
Discussion started by: isingh786
1 Replies
Login or Register to Ask a Question