Script 1
Pre-requisites
Create a file with x amount of lines in it, the content of your choice.
Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
I have tried
sed '/6/a text_to_inserted' file > newfile
but this inserts test_to_insert at random places in file and i want it in specific location, which is line 6.
can anyone help.... (6 Replies)
Hi,
I have a log file generated by a tool which has the following look :
/tmp/releases/directory/datefilename1_release_date.zip
/tmp/releases/directory/datefilename2_release_date.zip
/tmp/releases/directory/datefilename3_release_date.zip... (8 Replies)
Hi All,
I have below type file.
abc|asd|pqr|2|2|2
asc|qwe|scf|5|4|4
Pipe location and count is dynamic and coming from a variable.
I want to change it to below files.
(chnage the first pipe to 3 pipes)
abc|||asd|pqr|2|2|2
asc|||qwe|scf|5|4|4
(chnage the second pipe to 4 pipes)... (1 Reply)
exmaple, i need to replace the number "5" from all lines below with "X"?
What is the useful vim command that i can apply for..
ddpadsgg506xghssuyj
ddpadsgag546xghssuys
ddsadsgaag596xghssuy_te
ddsadsgag506xghssuy_pe
ddsadsgagc526xghssuys
ddsads506ighssuys
ddsadsgag506pghssuyk (1 Reply)
I need an awk script that returns the 1st field of the line in the middle of a file. For example, if a file I have has 6 lines, I want it to return the 1st field on line number 3. If a file has 7 lines, I want the script to return the 1st field on line number 4.
File1:
3 214
4 219
5 226
2... (8 Replies)
I have a file and I can get the line with a specific pattern. I want to inset # on start of the line.
file.text
====
aa bb cc
bb hh kk
kk ll yy
dd aa kk
rr tt aa
I want to comment out the line with contain "aa"
after running the script
file.text
====
#aa bb cc
bb hh kk
kk ll... (7 Replies)
Hi,
If my first character of a line starts with 2 then after 5th charecter newline character should be inserted.
Input.txt:
a1234567890
2222300007
bsdfsdf888999999
ssdfkjskfdjskfdjd
2899900000000099999999999999
28887777
999999999999999999
Output.txt:
a1234567890
22223
00007... (8 Replies)
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
Hi,
I'm trying to add a new line after finding a specific String.
That is my string:
volumes:
- ${DIR_WORK}/loadbalancer/html:/var/www/html
and I want to change that file to:
volumes:
- ${DIR_WORK}/loadbalancer/html:/var/www/html
extra_hosts:
-... (4 Replies)
Discussion started by: siamak
4 Replies
LEARN ABOUT CENTOS
gd::barcode::code39
Barcode::Code39(3) User Contributed Perl Documentation Barcode::Code39(3)NAME
GD::Barcode::Code39 - Create Code39 barcode image with GD
SYNOPSIS
ex. CGI
use GD::Barcode::Code39;
binmode(STDOUT);
print "Content-Type: image/png
";
print GD::Barcode::Code39->new('*CODE39IMG*')->plot->png;
with Error Check
my $oGdBar = GD::Barcode::Code39->new('*123456789;*');
die $GD::Barcode::Code39::errStr unless($oGdBar); #Invalid Characters
DESCRIPTION
GD::Barcode::Code39 is a subclass of GD::Barcode and allows you to create CODE-39 barcode image with GD. This module based on "Generate
Barcode Ver 1.02 By Shisei Hanai 97/08/22".
new
$oGdBar = GD::Barcode::Code39->new($sTxt);
Constructor. Creates a GD::Barcode::Code39 object for $sTxt.
plot()
$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
creates GD object with barcode image for the $sTxt specified at new method. $iHeight is height of the image. If NoText is 1, the image has
no text image of $sTxt.
ex.
my $oGdB = GD::Barcode::Code39->new('*12345*');
my $oGD = $oGdB->plot(NoText=>1, Height => 20);
# $sGD is a GD image with Height=>20 pixels, with no text.
barcode()
$sPtn = $oGdBar->barcode();
returns a barcode pattern in string with '1' and '0'. '1' means black, '0' means white.
ex.
my $oGdB = GD::Barcode::Code39->new('*12345*');
my $sPtn = $oGdB->barcode();
# $sPtn = '';
$errStr
$GD::Barcode::Code39::errStr
has error message.
$text
$oGdBar->{text}
has barcode text based on $sTxt specified in new method.
AUTHOR
Kawai Takanori GCD00051@nifty.ne.jp
COPYRIGHT
The GD::Barocde::Code39 module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
SEE ALSO
GD::Barcode
perl v5.16.3 2003-05-29 Barcode::Code39(3)