Sponsored Content
Top Forums Shell Programming and Scripting a shell script to generate an excel sheet from a text file.. Post 302655923 by vemkiran on Thursday 14th of June 2012 03:46:33 AM
Old 06-14-2012
Quote:
Originally Posted by Scrutinizer
By changing OFS:
Code:
awk '$2 ~ /\. \[/{$1=x; print}' RS=\*  FS='\n' OFS='|' infile


cool thanks a lot buddy!
but can i ask for another favour?
the problem is the address length is varying and the order in the csv isnt proper..
like one record shows two cells of address while other 1 cell.. can we do anythingto that?

btw thanks againSmilie
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

Adding tab to excel sheet with shell script

(1 Reply)
Discussion started by: sagar_1986
1 Replies

8. 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

9. 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

10. 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
thai/thcell.h(3)						      libthai							  thai/thcell.h(3)

NAME
thai/thcell.h - Thai string cell custering. SYNOPSIS
Data Structures struct thcell_t Thai char cell representation. Functions void th_init_cell (struct thcell_t *cell) Initialize a Thai cell. size_t th_next_cell (const thchar_t *s, size_t len, struct thcell_t *cell, int is_decomp_am) Get first cell from string. size_t th_prev_cell (const thchar_t *s, size_t pos, struct thcell_t *cell, int is_decomp_am) Get previous cell from string. size_t th_make_cells (const thchar_t *s, size_t len, struct thcell_t cells[], size_t *ncells, int is_decomp_am) Tokenize string into cells. Detailed Description Thai string cell custering. Function Documentation void th_init_cell (struct thcell_t *cell) Initialize a Thai cell. Parameters: cell : pointer to the cell to initialize Initializes values in the Thai cell struct. size_t th_make_cells (const thchar_t *s, size_tlen, struct thcell_tcells[], size_t *ncells, intis_decomp_am) Tokenize string into cells. Parameters: s : the string len : the length of string cells : the array of output cells buffer ncells : the address of integer storing the number of cells provided by the buffer, and to keep the number of resulting cells on return is_decomp_am : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells Returns: total characters consumed Tokenizes the string bounded by s and len into cells, and stores at most *ncells resulting cells in the cells buffer. On return, *ncells is also set to the total cells stored in cells[]. size_t th_next_cell (const thchar_t *s, size_tlen, struct thcell_t *cell, intis_decomp_am) Get first cell from string. Parameters: s : the string len : the length of string cell : the output buffer is_decomp_am : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells Returns: total chars consumed by the cell Gets first cell from the string bounded by s and len, and, if cell is not null, stores the cell data in it. size_t th_prev_cell (const thchar_t *s, size_tpos, struct thcell_t *cell, intis_decomp_am) Get previous cell from string. Parameters: s : the string pos : the position in string to get cell previous to cell : the output buffer is_decomp_am : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells Returns: total chars consumed by the cell Gets last cell from the string bounded by s and pos, and if cell is not null, stores the cell data in it. Author Generated automatically by Doxygen for libthai from the source code. Version 0.1.14 Tue Jun 17 2014 thai/thcell.h(3)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy