473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

parsed data in different position

Hi all,

I have a text file name "test.txt".

These file contain data like:-

00000237162724000002371627245557781803000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 001099001099320%00109920%IPY 2007013120070227Y99991231N YYX SRT0001010120%0000503318882HANDH800 R

i have to cut data in different position like 1-14,29-39 etc.

and then save the result in another file.

i have tried it but failed!

pls help me.I am new in linux platform.

Thanks!
Vaskar
Feb 25 '08 #1
2 1682
Hi all,

I have a text file name "test.txt".

These file contain data like:-

00000237162724000002371627245557781803000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 001099001099320%00109920%IPY 2007013120070227Y99991231N YYX SRT0001010120%0000503318882HANDH800 R

i have to cut data in different position like 1-14,29-39 etc.

and then save the result in another file.

i have tried it but failed!

pls help me.I am new in linux platform.

Thanks!
Vaskar
Did you try cut?

Expand|Select|Wrap|Line Numbers
  1. ubuntux% cut -c 1-14 file
  2. 00000237162724
  3.  
  4. % cut -c 29-39 file
  5. 55577818030
  6.  
With cut (GNU coreutils):
Expand|Select|Wrap|Line Numbers
  1. % cut -c 1-14,29-39 --output-delimiter=" "  file
  2. 00000237162724 55577818030
Feb 25 '08 #2
cut -c 1-14,29-39 --output-delimiter=" " file

i have tried the command.But there is no space or tab showing in the out put display.pls help me.

Thanks!
vaskar
Feb 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sreenivasan alakappan | last post by:
Hello, I am currently having an application that gets the filtered data from the ticket register from a gas station.I use this as the input stream and use JavaCC to parse this file. For Eg, the...
0
by: Dave Bailey | last post by:
How can I dynamically position a datagrid control on a webform? I created the datagrid dynamically so I can;t just draw it where I want it. I tried the System.Frawing.Point code but it doesn;t...
8
by: feel | last post by:
Hi, i need to read data from an Access Database. My problem is that all data have to be parsed or calculated so i'm looking for the fastest way. How to do that? Do i need a dataset or two...
1
by: pb | last post by:
Is it possible for a button to be pressed that causes a postback and then return to a different part of the page specified by a bookmark - ie move the user to the next section? Cheers, Pb
1
by: eternalLearner | last post by:
the output file i have coded is not binary file yet the output file is binary.please tell me wat could be the problem.
2
by: amitsaxena1981 | last post by:
hi, I m using asp.net2005 with vb.net ,I have to create gridview user control so I want to drag and drop a record to a different position in same gridview without using third party control,...
2
by: amitsaxena1981 | last post by:
hi, I am using asp.net2.0 with vb.net , I have to create gridview user control and I want to drag and drop a record to a different position in the same Gridview using AJAX .Is it possible to...
1
by: indirareddy | last post by:
Hai this is indira reddy ....... this is big proublem how to transfer Data one registration form to at time 40 other registration forms......are u not understanding.....i explain once...
2
by: mariaz | last post by:
Hello, I am creating a project where I parse an xml page (feed from a website) in a javabean file and I insert the parsed data in a mysql database. I want this data that gets inserted into the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.