I stored results like this
VAR=`wc -l < ls.txt`
But the value of the wc gave me a padded number.
How do I strip the padding from $VAR?
Do you think I could use SED?
Except instead of a file input, have a variable redirection input? (2 Replies)
hi
I am trying to invoke another application script from my script like
---------------------------
main
.
.
./new appl <<EOF
Input 1
Input 2
EOF
.
.
exit
------------------------
But is exits the new application after input command 2, I want that it should not exit and accept... (1 Reply)
All,
I am driving myself crazy over this one. I have run a find command against a volume on a nas. That returns a full listing of path and file name.
This is an example of one line of output. I redirected the output of the find command to a file.
... (4 Replies)
I have a script that uses cli curl, and it would be easier if it was possible to pass variables like this:
curl -c $cookie -d $data www.********.comThis doesn't work, instead I have to generate a string and use eval.
Is there another, easier way to pass variables to cli curl? (1 Reply)
I have a spent a day with Google trying to figure this one out and have decided its time to ask the experts...
I'm running OS X 10.6
I need to use cURL to FTP a file.
I have been successful send the file from the command line when I know the filename. My problem is that the filename changes... (2 Replies)
Hi friends,
I am very new to Unix scripting and having some difficulty in my first shell script.
I have written a simple shell script to upload an artifact to a remote machine on the network.
echo "Uploading the artifact"
scp app.war username@remotemochine.domainname.net:/home/deployables... (3 Replies)
I'm having a problem with this....
---------------------------------------------------
#!/bin/bash
SPKTAG=" | festival --tts"
echo "Welcome to my shell program" "$SPKTAG";
---------------------------------------------------
I have a variable call SPKTAG " | festival --tts" and I... (2 Replies)
Hello experts!
I have a file1 with the following format (yr,day, month, hour,minute):
201201132435
201202141210
201304132030
201410100110
...
What i want to do is to assign variables and then use them in the curl command to download the text of each event from a web page.
What I have... (6 Replies)
Hi guys!
Kind of new to bash scripting and now I'm stuck.
I need to curl with these variables:
"{ \"nodename\": \"$1\", \"ipaddress\": \"$2\", \"poolname\": \"$3\", \"port\": \"$4\", \"loadbalancer\" : \"$5\" }"
and my input_file.txt contains
server001 10.10.10.01 serverpool1 80... (4 Replies)
Hi Experts
I would like to ask if there is a way to validate if the variable passed is in this kind of sample format "06-10" or "10-01". It was really a challenge to me on how to start and echnically the "6-10" stands for "June 10" and "10-01" stands as "October 1", overall it needs to have ... (3 Replies)
Discussion started by: ersan-poguita
3 Replies
LEARN ABOUT DEBIAN
test::inline::content::legacy
Test::Inline::Content::Legacy(3pm) User Contributed Perl Documentation Test::Inline::Content::Legacy(3pm)NAME
Test::Inline::Content::Legacy - Test::Inline 2 Content Handler for legacy functions
SYNOPSIS
Custom script content generation using Test::Inline 2.000+ with a custom generator functions
my $header = "....";
my $function = sub {
my $Object = shift;
my $Script = shift;
return $header . $Script->merged_content;
};
my $Inline = Test::Inline->new(
...
file_content => $function,
);
Migrating this same code to Test::Inline 2.100+ ContentHandler objects
my $header = "....";
my $function = sub {
my $Object = shift;
my $Script = shift;
return $header . $Script->merged_content;
};
my $ContentHandler = Test::Inline::Content::Legacy->new( $function );
my $Inline = Test::Inline->new(
...
ContentHandler => $ContentHandler,
);
DESCRIPTION
This class exists to provide a migration path for anyone using the custom script generators in Test::Inline via the "file_content" param.
The synopsis above pretty much says all you need to know.
METHODS
new $CODE_ref
The "new" constructor for "Test::Inline::Content::Legacy" takes a single parameter of a "CODE" reference, as you would have previously
provided directly to "file_content".
Returns a new "Test::Inline::Content::Legacy" object, or "undef" if not passed a "CODE" reference.
coderef
The "coderef" accessor returns the "CODE" reference for the object
process $Inline $Script
The "process" method works with the legacy function by passing the Test::Inline and Test::Inline::Script arguments straight through to the
legacy function, and returning it's result as the return value.
SUPPORT
See the main SUPPORT section.
AUTHOR
Adam Kennedy <adamk@cpan.org>, <http://ali.as/>
COPYRIGHT
Copyright 2004 - 2010 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.12.4 2010-11-22 Test::Inline::Content::Legacy(3pm)