Unix Programming - ID help

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2007 > ID help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ID help
rogv24@yahoo.com

2007-03-29, 1:24 pm

I have a file that looks like this:
t12345,t252526,t27272,t484848,

I am trying to extract the ID and write them to a file.
Can anyone help.
Thanks

Lew Pitcher

2007-03-29, 7:18 pm

On Mar 29, 1:37 pm, rog...@yahoo.com wrote:
> I have a file that looks like this:
> t12345,t252526,t27272,t484848,
>
> I am trying to extract the ID


What ID? What part of that characterstring is the ID? Is there more
than one?

> and write them to a file.
> Can anyone help.


Probably, but you are going to have to be clearer about what it is
that you are trying to do.

Also, as this is the comp.unix.programmer newsgroup, and not (say)
comp.unix.shell, you'll have to give us a clue as to what would be an
acceptable solution. Are you looking for a bash solution, or would awk
do? Is C acceptable, or do you want to do this in Perl?

--
Lew


Logan Shaw

2007-03-30, 7:17 am

rogv24@yahoo.com wrote:
> I have a file that looks like this:
> t12345,t252526,t27272,t484848,
>
> I am trying to extract the ID and write them to a file.
> Can anyone help.


Not until you explain what an ID is. Is it a number? Does it
include a "t"? Are there 4 of them on that line, or is there 1,
or is it some other number? Is it significant that there's a
comma at the end of the line, and does that mean that there
are actually 5 IDs on that line and that the last ID on the line
is the empty string?

- Logan
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com