Sponsored Content
Top Forums Shell Programming and Scripting Printing from multiline output Post 303038525 by Neo on Thursday 5th of September 2019 07:38:21 AM
Old 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

Printing output to the monitor

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

printing output more than 13

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

assigning a multiline grep output which has been piped through sed to a shell variabl

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

Printing output with interval between letters

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

Grabbing IP and zonename from multiline 'ifconfig' output

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

Printing a 2 column output using scripts

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

Help with printing output format from a file

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

Printing Popen Output Using Windows 7

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

awk printing output to new line

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

Printing the output of sed using a loop

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
apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR:UsereContributed Perl Doapache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR::Base64(3)

NAME
APR::Base64 - Perl API for APR base64 encoding/decoding functionality Synopsis use APR::Base64 (); my $clear = "foo" my $encoded = APR::Base64::encode($clear); my $decoded = APR::Base64::decode($encoded); my $len_enc = APR::Base64::encode_len(length $clear); Description "APR::Base64" provides the access to APR's base64 encoding and decoding API. API
"APR::Base64" provides the following functions and/or methods: "decode" Decode a base64 encoded string $decoded = decode($encoded); arg1: $encoded ( string ) The encoded string. ret: $decoded ( string ) The decoded string. since: 2.0.00 "encode" Encode a string to base64 $encoded = encode($clear); arg1: $clear ( string ) The unencoded string. ret: $encoded ( string ) The encoded string. since: 2.0.00 "encode_len" Given the length of an unencoded string, get the length of the encoded string. $len_enc = encode_len($len_clear); arg1: $len_clear ( integer ) the length of an unencoded string. ret: $len_enc ( integer ) the length of the string after it is encoded since: 2.0.00 See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.16.2 2011-02-07 apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR::Base64(3)
All times are GMT -4. The time now is 07:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy