01-21-2008
Quote:
Originally Posted by
kukretiabhi13
needa c program to extract text between two delimiters from some text file.
and then storing them in to diffrent variables ?
text file like 0:
abc.txt
=========
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
==============
I have a question as I am unable to follow your thread. Do you want each of the values separated by the pipe symbol "|" to be stored into a separate variable and what do you want to do with them afterwards?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have an input file which looks like
"
@$SCRIPT/atp_asrmt_adj.sql
$SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls
$SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls
start $SCRIPT/cim1020d.sql;^M
spool $DATA/cim1021m.sql
@$DATA/cim1021m.sql
! rm $DATA/cim1021m.sql
spool $DATA/cim1021m.sql... (6 Replies)
Discussion started by: dowsed4u8
6 Replies
2. Shell Programming and Scripting
Hi,
In ksh, I have a file with similar rows as follows:
Department = 1234 G/L Asset Acct No = 12.0000. 2/29/2008
Department = 1234 G/L Asset Acct No = 13.0000. 3/29/2008.
I want to create a new text file that contains only the numbers and date:
1234 12.0000. 2/29/2008
1234 13.0000. ... (16 Replies)
Discussion started by: ihot
16 Replies
3. AIX
Hi,
Can somebody help me with the below situation,
Input File,
========
2007_08_07_IA-0100-014_(MONTHLY).PDF
2007_08_07_IA-0100-031_(QUARTERLY)(RERUN).PDF
2008-02-28_KR-1022-003_(MONTH)(RERUN)(REC1).CSV
Required output,
============
MONTHLY
QUARTERLY
MONTH
... (15 Replies)
Discussion started by: sravicha
15 Replies
4. Shell Programming and Scripting
Hi
I am trying to fetch the rows with match string "0000001234"
Input file looks like below:
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1... (6 Replies)
Discussion started by: nareshk
6 Replies
5. Shell Programming and Scripting
I have two files
file A which have a number in every row and file B which contains few hundred thousand rows with about 300 characters in each row (csv)
What I need is to extract whole rows from B file (only these which numbers are indicated in A file)
I also need to use cygwin.
Any... (7 Replies)
Discussion started by: gunio
7 Replies
6. Shell Programming and Scripting
I try order the content from file by delimiters.
This is the text:
interface Loopback0
description !!!RID RR_SLT
ip address 172.31.128.19 255.255.255.255
interface GigabitEthernet0
description !!!P_SLT GI0/0/9
ip address 172.31.130.246 255.255.255.252
and the result that I need... (11 Replies)
Discussion started by: bobbasystem
11 Replies
7. Shell Programming and Scripting
I have been reading several posts regarding how to extract text from a file, but none of those have helped me for what I need.
This is my problem: I need to extract the text after my pattern
So my line is:
485.74 6589.5 Log likelihood: 1485.79
My pattern is 'Log likelihood:'
and I need... (2 Replies)
Discussion started by: loperam
2 Replies
8. Shell Programming and Scripting
So I'm racking my brain on appropriate ways to solve a problem that once fixed, will solve every problem in my life. Its very easy (for you guys and gals) I'm sure, but I can't seem to wrap my mind around the right approach. I really want to use bash to do this, but I can't grasp how I'm going to... (14 Replies)
Discussion started by: eh3civic
14 Replies
9. Shell Programming and Scripting
Hi i want to extract the word present before .txt in the text file.
For example,
Sample_ab_a.txt ----------> i need 'a'
Sample_abc_b.txt -----------> i need 'b'
Can anyone help me in getting the word extracted (5 Replies)
Discussion started by: Sindhuap
5 Replies
10. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT DEBIAN
perlbal::plugin::palimg
Perlbal::Plugin::Palimg(3pm) User Contributed Perl Documentation Perlbal::Plugin::Palimg(3pm)
NAME
Perlbal::Plugin::Palimg - plugin that allows Perlbal to serve palette altered images
VERSION
This documentation refers to "Perlbal::Plugin::Palimg" that ships with Perlbal 1.50
DESCRIPTION
Palimg is a perlbal plugin that allows you to modify "GIF" and "PNG" on the fly. Put the images you want to be able to modify into the
"DOCROOT/palimg/" directory. You modify them by adding "/pSPEC" to the end of the url, where SPEC is one of the below defined commands
(gradient, tint, etc).
CONFIGURING PERLBAL
To configure your Perlbal installation to use Palimg you'll need to "LOAD" the plugin then add a service parameter to a "web_server"
service to activate it.
Example "perlbal.conf":
LOAD palimg
CREATE SERVICE palex
SET listen = ${ip:eth0}:80
SET role = web_server
SET plugins = palimg
SET docroot = /usr/share/doc/
SET dirindexing = 0
ENABLE palex
GRADIENTS
You can change the gradient of the image by adding "/pg0011111164ffffff" to the end of the url. 00 is the index where the gradient starts
and 111111 is the color (in hex) of the beginning of the gradient. 64 is the index of the end of the gradient and "ffffff" is the color of
the end of the gradient. Note that all colors specified in hex should be lowercase.
Example:
http://192.168.0.1/palimg/logo.gif/pg01aaaaaa99cccccc
TINTING
You can tint the image by adding "/pt000000aaaaaa" to the end of the url. 000000 should be replaced with the color to tint towards.
"aaaaaa" is optional and defines the "dark" tint color. Both colors should be specified as lowercase hex numbers.
Example:
http://192.168.0.1/palimg/logo.gif/pt1c1c1c22dba1
PALETTE REPLACEMENT
You can specify a palette to replace the palette of the image. Do this by adding up to six sets of seven hex lowercase numbers prefixed
with "/p" to the end of the URL.
Example:
http://192.168.0.1/palimg/logo.gif/p01234567890abcfffffffcccccccddddddd
BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to the Perlbal mailing list, http://groups.google.com/group/perlbal
Patches are welcome.
AUTHORS
Brad Fitzpatrick <brad@danga.com> Mark Smith <junior@danga.com>
LICENSE AND COPYRIGHT
Artistic/GPLv2, at your choosing.
Copyright 2004, Danga Interactive Copyright 2005-2007, Six Apart Ltd
perl v5.14.2 2010-12-20 Perlbal::Plugin::Palimg(3pm)