It looks like sed could be useful here. This is how you could start your control file (file name after sed -f).
From here you have all three input records in your pattern space, separated by "\n" character. A set of "s" commands can take out the "boiler plate" constants and the new-line characters. The last "s" will make it ready to output, there are two spaces in front of the asterisk.
Hello all,
I am a unix dummy. I am trying to remove spaces between fields. I have the file in the following format
12332432, 2345 , asdfsdf ,100216 , 9999999
12332431, 2341 , asdfsd2 ,100213 , 9999999
&... (2 Replies)
I have a situation where I am reading a text file line-by-line. Those lines of data contain comma separated fields of data. However, each line can vary in the number of fields it can contain. What I need to do is parse apart each line and write each field of data found (left to right) into a file.... (7 Replies)
Hi,
I have a variable which has a list of string separated by comma.
for ex ,
Variable=/usr/bin,/usr/smrshbin,/tmp
How can i get the values between the commas separately using shell scripts.Please help me.
Thanks,
Padmini. (6 Replies)
Hi
pls help me to get the code:
i have a file in which content is :
2.01304E+11 2.01304E+11 ori 2 01:00
2.01304E+11 2.01304E+11 ori 2 01:02
2.01304E+11 2.01304E+11 ori 3 01:02
2.01304E+11 2.01304E+11 ori 3 ... (7 Replies)
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
hello experts,
i am retrieving values in variables jobKey and jobName within my shell script. these values are returned to me within braces and i am using following command to remove those braces:
jobKeys=`echo $jobKeys | sed 's:^.\(.*\).$:\1:'`
jobNames=`echo $jobNames | sed... (1 Reply)
Hi,
I have a list of tables in a file.txt
C_CLAIM
C_HLD
C_PROVIDER
I want the output to be
'C_CLAIM','C_HLD','C_PROVIDER'
Currently I'm usin awk and getting output which is almost correct but still has minor defects
awk -vORS="','" '{ print $1 }' file.txt
The output of... (4 Replies)
My OS : RHEL 6.7
I have a text file with comma separated values like below
$ cat testString.txt
'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', . . . .
I want these values to appear like below
'JOHN' ,
'KEITH' ,
'NEWMAN' ,
'URSULA' ,
'ARIANNA' ,
'CHENG',
.... (4 Replies)
can anyone help me!!!! How to I parse the CSV file
file name : abc.csv (csv file) The above file containing data like
abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
LEARN ABOUT DEBIAN
convert::color::cmyk
Convert::Color::CMYK(3pm) User Contributed Perl Documentation Convert::Color::CMYK(3pm)NAME
"Convert::Color::CMYK" - a color value represented as cyan/magenta/yellow/key
SYNOPSIS
Directly:
use Convert::Color::CMYK;
my $red = Convert::Color::CMYK->new( 0, 1, 1, 0 );
# Can also parse strings
my $pink = Convert::Color::CMYK->new( '0,0.3,0.3,0' );
Via Convert::Color:
use Convert::Color;
my $cyan = Convert::Color->new( 'cmyk:1,0,0,0' );
DESCRIPTION
Objects in this class represent a color in CMYK space, as a set of four floating-point values in the range 0 to 1.
CONSTRUCTOR
$color = Convert::Color::CMYK->new( $cyan, $magenta, $yellow, $key )
Returns a new object to represent the set of values given. These values should be floating-point numbers between 0 and 1. Values outside of
this range will be clamped.
$color = Convert::Color::CMYK->new( $string )
Parses $string for values, and construct a new object similar to the above three-argument form. The string should be in the form
cyan,magenta,yellow,key
containing the three floating-point values in decimal notation.
METHODS
$c = $color->cyan
$m = $color->magenta
$y = $color->yellow
$k = $color->key
Accessors for the four components of the color.
$k = $color->black
An alias to "key"
( $cyan, $magenta, $yellow, $key ) = $color->cmyk
Returns the individual cyan, magenta, yellow and key components of the color value.
SEE ALSO
o Convert::Color - color space conversions
o Convert::Color::CMY - a color value represented as cyan/magenta/yellow
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.12.3 2011-06-15 Convert::Color::CMYK(3pm)