Hi,
this is my test file :
DELETE FROM TABLE
WHERE ID_INTERNAL = :TABLE.ID-INTERNAL, ID-INTERNAL-CRAZY
ID-INTERNAL-OPEN
ID-INTERNAL
/ID-INTERNAL/
I want all occurences of ID-INTERNAL replaced with a one, if ID-INTERNAL has and dash afer it , dont replace it example:... (6 Replies)
So, I have this script. It reads a CSV file that has a mixture of object names with IP addresses (parsing out that part I have working), and object names which have a DNS name. I want to be able to run a "dig +short" based off of the name given to me in the line of the awk script, and then deal... (6 Replies)
hi everyone
i am trying to do this
bash> cat abc.sh
deepak()
{
echo Deepak
}
deepak
bash>./abc.sh
Deepak
so it is giving me write simply i created a func and it worked
now i modified it like this way
bash> cat abc.sh (2 Replies)
HI,
MY question is a very simple one:
if i want to call an awk script with the input file name and also pass a variable value , then how to do it.
#>awk -f my_script.awk -v variable=value my_inputfile.txt
I can't do it like this.
throws error:
awk: my_script.awk:18:... (0 Replies)
The below awk script (loop.awk) is in the cygwin home directory. I do a cd to the directory where the Sources.txt is (where I would like the data output in), but the script does not run: echo loop | ./loop.awk
loop.awk
#!/bin/awk -f
BEGIN {}
cat Sources.txt | while read a
do... (10 Replies)
Hi
I have a text file (Input.txt) with two column entries separated by tab as given below:
aaa str1
bbb str2
cccccc str3
dddd str4
eee str3
ssss str2
sdf str3
hhh str1
fff str2
ccc str3
.....
.....
..... (1 Reply)
Hi again and thanks to R.Singh.
One more question here.
The code works in awk. (or GAWK)
awk 'BEGIN{print "Enter your Name: ";getline name < "-";print RS "Input entered by user is: "name}'
How to display the variable name again ?
The awk script is running automaticly to the... (3 Replies)
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT DEBIAN
netsds::util::types
NetSDS::Util::Types(3pm) User Contributed Perl Documentation NetSDS::Util::Types(3pm)NAME
NetSDS::Util::Types - type checking routines
SYNOPSIS
use NetSDS::Util::Types;
# Check if variable contains integer value
if (is_int($var)) {
$var++;
} else {
print "Value is not integer!";
}
DESCRIPTION
"NetSDS::Util::Types" module contains functions for checking data for being of exact data types.
EXPORTED FUNCTIONS
is_int($var) - check if parameter is integer
Check if given parameter is integer
is_float([...]) - check if parameter is float number
Check if given parameter is float number
is_date([...]) - check if parameter is date string
Return 1 if parameter is date string
is_binary([...]) - check for binary content
Return 1 if parameter is non text.
is_ref_scalar($ref) - check if reference to scalar value
Return true if parameter is a scalar reference.
my $var = 'Scalar string';
if (is_ref_scalar($var)) {
print "It's scalar value";
}
is_ref_array($ref) - check if reference to array
Return true if parameter is an array reference.
is_ref_hash($ref) - check if hashref
Return true if parameter is a hash reference.
is_ref_code($ref) - check if code reference
Return true if parameter is a code reference.
is_ref_obj($ref, [$class_name]) - check if blessed object
Return true if parameter is an object.
EXAMPLES
None
BUGS
None
TODO
Add more functions.
SEE ALSO
None.
AUTHORS
Valentyn Solomko <pere@pere.org.ua>
Michael Bochkaryov <misha@rattler.kiev.ua>
perl v5.12.4 2011-08-27 NetSDS::Util::Types(3pm)