Sponsored Content
Full Discussion: Sed to format data in a file
Top Forums UNIX for Advanced & Expert Users Sed to format data in a file Post 302225084 by vidyadhar85 on Thursday 14th of August 2008 01:49:23 PM
Old 08-14-2008
try this
sed '/./N;s/\n/ /;/./N;s/\n/ /;/./N; s/\n/ /;/./N; s/\n/ /;/^$/d' filename
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to number format a data file without using SED?

Hi I have a file which contains data (list of data) and I want to put a number with bracket 1) 2) 3) etc at the beginning of every successive line I can do it with SED and I can also do it using the nl route but am looking for a different method. I'm guessing I would need some sort of loop... (3 Replies)
Discussion started by: Cactus Jack
3 Replies

2. UNIX for Dummies Questions & Answers

I want some selected data from first file and put into other file in specified format

I have a file with follwing content ---------------------------------- SCHEDULE XXXXXXXXX#JOBCOUNT ON EVERYDAY AT 0000 PRIORITY 50 SCHEDULE XXXXXXXXX#ABCDEFGH ON EVERYDAY AT 0001 PRIORITY 29 SCHEDULE... (5 Replies)
Discussion started by: shreyas
5 Replies

3. UNIX for Dummies Questions & Answers

Format/Fix Timestamp Data in a File.

Hello Experts, I have a timestamp(6) column in a .csv data file , format of the data is as below:- ETCT,P,Elec, Inc.,abc,11/5/2010 4:16:09.000000 PM,Y,Y,Y I want the timestamp column to be properly formatted like 11/05/2010 04:16:09.000000 PM Currently the "0" is missing with... (3 Replies)
Discussion started by: mtlrsk
3 Replies

4. Shell Programming and Scripting

Masking data for different file format

Hi, I have 3 kind of files that contains date data needed to be masked. The file is like this: File 1 (all contents in 1 line): input:DTM+7:201103281411:203'LOC+175+SGSIN:139:6+TERMINATOR......'DTM+132:201103281413:203'LOC.... output:... (4 Replies)
Discussion started by: Alvin123
4 Replies

5. UNIX for Dummies Questions & Answers

How to Open a data format file?

Hi, Am having a file. I checked that file format by the following command file filename Output is filename: data So the file is data format file Am trying to view that file so i have used some commands like cat,more so on but it showing the contents like compressed form(full of Symbols). How... (4 Replies)
Discussion started by: Adhi
4 Replies

6. UNIX for Dummies Questions & Answers

Format the data file

hi all, i am new to unix forum,i want do some large data format work. pls help me to format the file. i have attched data file to be formated in that two set of line item is there . first set header & second set header to be come in to single header item same as like all the data also. ... (2 Replies)
Discussion started by: dhamu
2 Replies

7. UNIX for Advanced & Expert Users

Identifing The Format of Data File

Hello All, We are receiving UTF-16 formatted file and when i vi the file in Linux OS i am seeing some weird characters, is this because in my .bashrc profile the language variable has been set to LC_ALL=en_US.UTF-8 and hence the reason i am not able to read the UTF-16 formatted file properly? or... (2 Replies)
Discussion started by: Ariean
2 Replies

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

9. Shell Programming and Scripting

Sort data in text file in particular format

I have to sort below output in text file in unix bash 20170308 DA,I,113 20170308 PM,I,123 20170308 DA,U,22 20170308 PM,U,123 20170309 DA,I,11 20170309 PM,I,23 20170309 DA,U,123 20170309 PM,U,233 (8 Replies)
Discussion started by: Adfire
8 Replies

10. UNIX for Beginners Questions & Answers

Log file data into CSV format

I m looking for help here!!! Can we filter the below log data into CSV format ? 1 2 3 4 5 6 7 8 timestamp INFO <text > - Some text (1 Reply)
Discussion started by: MohSalNiz
1 Replies
XGFUPDATE(1)						      General Commands Manual						      XGFUPDATE(1)

NAME
xgfupdate - updates an Xgridfit program file to the latest version. SYNOPSIS
xgfupdate file DESCRIPTION
Xgfupdate is a utility that updates an Xgridfit program file so that it validates against the current xgridfit.rnc schema. Xgfupdate out- puts the updated file to stdout. To capture the output in a file, use this syntax: $xgfupdate [options] infile > outfile OPTIONS
-h Display a help message and exit. -v 1|2 Choose a mode in which to run Xgfupdate. "1" updates an Xgridfit program so that it will validate against the 2.0 schema. "2" updates an Xgridfit program from version 1.x or 2.0 to version 2.1 by adding the Xgridfit namespace; it also revises XInclude elements to be aware of the Xgridfit namespace. FILES
/usr/share/xml/xgridfit/util/xgf-update.xsl /usr/share/xml/xgridfit/util/xgf-add-namespace.xsl XSLT scripts that do the updating. /usr/share/xml/xgridfit/util/add-blanks.sed A Sed script that does some formatting of the output. SEE ALSO
xgridfit(1). AUTHOR
Xgfupdate was written by Peter Baker <psb6m@virginia.edu>. This manual page was written by Peter Baker 2009-12-18 XGFUPDATE(1)
All times are GMT -4. The time now is 08:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy