Hi pc2001,
Would you please explain what you are trying to do with the following code?:
Does dataworksheet.txt contain the final component of pathnames to be copied or is it just a string or pattern that can appear anywhere in the name of a file (including a directory) found anywhere in the file hierarchy rooted in /Users/pc/test?
Given that your destination directory is a subdirectory of the root of your search, do you really want find to include files found in /Users/pc/test/newdata while it is listing matching files found in /Users/pc/test?
If I did indeed grep something out of it, why woudln't $result show nothing?
When I do $? , it does show success...
What is the proper syntax so that $result shows actual thing it's grepping out?
result=`(ssh $host tail -1 /something/somethingelse) | egrep -i "value" >dev/null`
#echo... (3 Replies)
Hi,
have a basic query.
Please see the below code:
list="one two three"
for var in $list ; do
echo $var
list="nolist"
Done
Wht if I want to print only first/ last line in the list
Eg one & three
Regards
er_ashu (3 Replies)
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
sorry for being dumb here, but is there a way my for loop can take an entire line of a file into consideration instead of each word in a line... ill explain
if i have a file like this
# cat list
serial: 23124
hostname: server1
and a script that does this
# cat list.sh
#!/bin/sh
... (6 Replies)
I'm trying to approach a problem but all I'm coming up with are complex ways to manipulate the data. But still not getting the desired outcome.
directory of files....
file-100-foo
file-100-man
file-100-chu
Need to copy the files and increment the number in the file name
... (4 Replies)
Hi,
I have a text file with data in that I wish to extract, assign to a variable and process through a loop.
Kind of the process that I am after:
1: Grep the text file for the values.
Currently using:
cat /root/test.txt | grep TESTING= | awk -F"=" '{ a = $2 } {print a}' | sort -u
... (0 Replies)
Hi,
I have a loop like this -
while read item
do
// fire insert query
done < itemList.txt
The itemList.txt has say, 1000 records. Now what I do is that rhough another program, I make the itemList.txt EMPTY, but still the INSERT query keeps firing the sequence of records.
... (18 Replies)
hey guys
I would really appreciate some help, i need to do a project for a job that requires minimal UNIX scripting and im REALLY stuck
basically Im stuck at what i believe is something really simple but i just dont have a clue how to do it efficiently and properly and i REALLY appreciate some... (16 Replies)
Hello all! I am very new to shell and Linux in general (I just started 2 days ago), I am trying to write a script that adds the size of the directories and files in a given directory and displays messages if the user puts in something wrong. I think I have covered all the possible problems except... (3 Replies)
I have two shell scripts in the different directories listed below,
/root/dev/dir1/test.sh
/root/dev/dir2/master.sh
I am executing the master.sh script from the test.sh like below and getting 'Permission denied' error.
#! /bin/sh
#test.sh
path='/root/dev'
$path/dir2/master.sh
But it... (2 Replies)
Discussion started by: vel4ever
2 Replies
LEARN ABOUT DEBIAN
gd::barcode::matrix2of5
Barcode::Matrix2of5(3pm) User Contributed Perl Documentation Barcode::Matrix2of5(3pm)NAME
GD::Barcode::Matrix2of5 - Create Matrix2of5 barcode image with GD
SYNOPSIS
ex. CGI
use GD::Barcode::Matrix2of5;
binmode(STDOUT);
print "Content-Type: image/png
";
print GD::Barcode::Matrix2of5->new('1234567890')->plot->png;
with Error Check
my $oGdBar = GD::Barcode::Matrix2of5->new('A12345678');
die $GD::Barcode::Matrix2of5::errStr unless($oGdBar); #Invalid Characters
$oGdBar->plot->png;
DESCRIPTION
GD::Barcode::Matrix2of5 is a subclass of GD::Barcode and allows you to create Matrix2of5 barcode image with GD.
new
$oGdBar = GD::Barcode::Matrix2of5->new($sTxt);
Constructor. Creates a GD::Barcode::Matrix2of5 object for $sTxt. $sTxt has numeric characters([0-9]).
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::Matrix2of5->new('12345678');
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::Matrix2of5->new('12345678');
my $sPtn = $oGdB->barcode();
$errStr
$GD::Barcode::Matrix2of5::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::Matrix2of5 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.12.3 2003-05-29 Barcode::Matrix2of5(3pm)