09-05-2019
So you question is:
Quote:
How to convert one text with Base64 decode and print the other two texts with the desired format?
The easy approach is to store each of the three texts / tokens you want to print in variables and then print a single string formatted as you wish.
I always process text like this in PHP (because I find PHP easier to read and maintain months and years after I write the scripts, but that's just me), so now that you have make it more clear what you want, I'll leave this to some of the great coders here who are into
awk.
Thanks for clarifying.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!,
In my shell scripts, I always create a logfile by adding the following line in the beginning:
exec >file.log 2>&1
This in turn directs all the output to this logfile till the script executes.
But now, I have to write some output to the monitor for the users.
So, i am doing it... (2 Replies)
Discussion started by: jyotipg
2 Replies
2. Shell Programming and Scripting
i want to print the idle time of the users more than 10 days.
for eg:
my "w" command output is like below.
-sh-3.00$ w
03:47:41 up 13 days, 16:59, 3 users, load average: 10.00, 10.00, 10.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 - ... (2 Replies)
Discussion started by: Krrishv
2 Replies
3. Shell Programming and Scripting
Hi,
I wish to format the output of a grep command in such a way that sed will be able to handle the newline characters held in the output.
Since sed does not allow newlines to be contained in a replacement pattern, that means adding a backslash '\' character to the end of each line from... (8 Replies)
Discussion started by: timculhane
8 Replies
4. Shell Programming and Scripting
I want to print/echo an output "This is the name of the game" where each letter will be printed/echoed after an interval of 1 sec (6 Replies)
Discussion started by: proactiveaditya
6 Replies
5. Shell Programming and Scripting
Hi There,
I have a Solaris server that has a bunch of zones configured and I am trying to write a script that will take all interfaces other than the loopback ones (e.g. lo0:3 etc) and present them so that I can easily determine the zone that owns the IP
So in the case of the following... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
6. Shell Programming and Scripting
Hi, I'm fairly new to scripting and Unix. I'm having trouble printing the number of directories and number of files in all the directories in 2 columns using scripts.
#!/bin/bash
echo "# of Directories --------- # of Messages/Files "
numDir= $(find . -type d | wc -l)
numMsg= $(find .... (4 Replies)
Discussion started by: nuclearpenguin
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I need help in printing data in below format from file extensions with .dml, i have listed details below
file name is test_temp.dml, location in /home/users/test01/test_temp.dml
file content:
sample_type=
record
decimal(",") test_type;
date("DD-MM-YYYY")(",") test_date... (2 Replies)
Discussion started by: AAHinka
2 Replies
8. Programming
Hi Guys,
I am new to python and I am trying to print ouput of Popen on my text screen (tkinter gui).
I was able to make it work on Linux with this code:
Linux: Working
def PrintSomething2():
outputdata = commands.getstatusoutput("sudo fping -f host.list")
for i in outputdata:... (2 Replies)
Discussion started by: tattoostreet
2 Replies
9. Shell Programming and Scripting
Hi
I have a file profile.txt with the below input:
{"atgUserId":"736f14c4-eda2-4531-9d40-9de4d6d1fb0f","firstName":"donna","lastName":"biehler","email":"schoolathome42@live.com","receiveEmail":"y
es"},
{"atgUserId":"c3716baf-9bf8-42da-8a44-a13fff68d20f","firstName":"Gilberto... (6 Replies)
Discussion started by: ankur328
6 Replies
10. Shell Programming and Scripting
So I am writing a bash script that will search a file line by line for unix timestamps, store all of the timestamps into an array, then check how many of those timestamps were created within the last hour, and finally increment a counter every time it finds a timestamp created within the last hour.... (6 Replies)
Discussion started by: jsikarin
6 Replies
VARIANT(3) 1 VARIANT(3)
VARIANT class
DESCRIPTION
The VARIANT is COM's equivalent of the PHP zval; it is a structure that can contain a value with a range of different possible types. The
VARIANT class provided by the COM extension allows you to have more control over the way that PHP passes values to and from COM.
$vVar = new VARIANT($var)
METHODS
VARIANT::VARIANT ([mixed $value], [int $type], [int $codepage])
VARIANT class constructor. Parameters:
o value
- initial value. if omitted, or set to NULL an VT_EMPTY object is created.
o type
- specifies the content type of the VARIANT object. Possible values are one of the VT_XXX"Predefined Constants". In PHP versions
prior to PHP 5, you could force PHP to pass a variant object by reference by OR'ing VT_BYREF with the $type. In PHP 5, this hack
is not supported; instead, PHP 5 can detect parameters passed by reference automatically; they do not even need to be passed as
VARIANT objects. Consult the MSDN library for additional information on the VARIANT type.
o codepage
- specifies the codepage that is used to convert strings to unicode. See the parameter of the same name in the "COM" class for
more information.
PHP versions prior to PHP 5 define a number of (undocumented) virtual properties for instances of the VARIANT class; these properties have
all been removed in PHP 5 in favour of its more natural syntax; these differences are best highlighted by example:
Example #1
Variant example, PHP 4.x style
<?php
$v = new VARIANT(42);
print "The type is " . $v->type . "<br/>";
print "The value is " . $v->value . "<br/>";
?>
Example #2
Variant example, PHP 5 style
<?php
$v = new VARIANT(42);
print "The type is " . variant_get_type($v) . "<br/>";
print "The value is " . $v . "<br/>";
?>
The reason for the change is that, internally, the COM extension sees VARIANT, COM and DOTNET classes as the same thing, and the design
philosophy for these classes is that all property and member accesses are passed through to COM with no interference. The new syntax is
more natural and less effort, and most of the removed virtual properties didn't make any sense in a PHP context in any case.
Note
PHP 5 takes a much simpler approach to handling VARIANTs; when returning a value or fetching a variant property, the variant is
converted to a PHP value only when there is a direct mapping between the types that would not result in a loss of information. In
all other cases, the result is returned as an instance of the VARIANT class. You can force PHP to convert or evaluate the variant as
a PHP native type by using a casting operator explicitly, or implicitly casting to a string by print(3)ing it. You may use the wide
range of variant functions to perform arithmetic operations on variants without forcing a conversion or risking a loss of data.
See also variant_get_type(3).
PHP Documentation Group VARIANT(3)