Sponsored Content
Full Discussion: [SHELL] Output formatting
Top Forums Shell Programming and Scripting [SHELL] Output formatting Post 302238345 by Adrnalnrsh on Friday 19th of September 2008 04:10:13 PM
Old 09-19-2008
Wonderful, thank you. I will give it a try.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formatting output

Hi need some advice.. #grep -i hostname test.csv (gives the below output) HOSTNAME,name,host_test,,,,,,,, Now I need to format the above output as below. HOSTNAME: name=host_test Any easy way of doing this using awk or sed or printf? (4 Replies)
Discussion started by: balaji_prk
4 Replies

2. Shell Programming and Scripting

Output Formatting

Hi Guys I need help removing some lines from output i am receiving from a shell script. Here is the output: http://i52.tinypic.com/10z0fut.png I am trying to remove the output that i have circled. . ${EDW}/extracts/bin/extracts_setup2.sh . ${EDW}/extracts/extracts.conf ... (7 Replies)
Discussion started by: mooey1232003
7 Replies

3. Shell Programming and Scripting

Formatting the query output using shell script

Hi All, I'm finding it difficult to format the query output that was returned in a shell script. Actually i have one shell script which does some DB stuff and depending on the result it will do some more tasks. My question here is to format the query output returned by mysql. Intitally my... (5 Replies)
Discussion started by: RSC1985
5 Replies

4. Shell Programming and Scripting

sql select command output formatting in shell script

Hi, I need to connect to the database and retrieve two variables from the database and store them in a variable,out of these two variables I need to get lastdigit appended to the variable 1 retrieved and variable 2 with out any modification in short select var,data from usage; o/p=... (1 Reply)
Discussion started by: rkrish
1 Replies

5. Shell Programming and Scripting

Problem in formatting output of SQL query in excel sheet in shell script

Hi Guys.. Need your help to format the output of my shell script. I am using spool command to take out put in csv file. below is my code. (for example) col USERNAME for a15 col EMAIL for a30 col FULL_NAME for a20 col LAST_LOGIN for a40 col DATE_CREATED for a40 SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies

6. Shell Programming and Scripting

Formatting the output

Hi, I have a file which contents entries in this form. Only in /data4/temp abc.000001 Only in /data4/temp abc.000003 Only in /data4/temp abc.000012 Only in /data4/temp abc.000120 Only in /data4/temp abc.000133 Only in /data4/temp abc.001444 i want to read line by line and format... (2 Replies)
Discussion started by: arijitsaha
2 Replies

7. Shell Programming and Scripting

Formatting Shell script output to Excel

I am facing a problem formatting the output of my shell script in excel. We are directing the output of the script to an excel sheet and need long integer type data printed in Excel as it is (i.e. not in the default scientific notation). Also, leading zeroes(if any) in the output are getting... (4 Replies)
Discussion started by: bornali.p
4 Replies

8. AIX

Help Formatting Output

I am using FORTRAN 90 on AIX 5.3 and need to output my data to a tab-delimited file. It must have actual tabs, and I cannot figure out a way to make it work. The resulting file will be imported into another application (quickbooks) as an .iif file....for some reason, it needs the tabs; spaces do... (2 Replies)
Discussion started by: KathyB148
2 Replies

9. Shell Programming and Scripting

Formatting output

I have the output like below: DEV#: 9 DEVICE NAME: hdisk9 TYPE: 1750500 ALGORITHM: Load Balance SERIAL: 68173531021 ========================================================================== Path# Adapter/Path Name State Mode Select Errors 0 ... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

10. Shell Programming and Scripting

SQL Query in Shell Script output formatting

Hi All, #!/bin/ksh call_sql () { sql=$1 sqlplus -s $sqlparam_sieb <<EOF SET ECHO OFF; SET NEWPAGE NONE; SET SQLBL OFF; SET VERIFY OFF; SET LINESIZE 2000; SET... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
Perl6::Junction(3)					User Contributed Perl Documentation					Perl6::Junction(3)

NAME
Perl6::Junction - Perl6 style Junction operators in Perl5. SYNOPSIS
use Perl6::Junction qw/ all any none one /; if (any(@grant) eq 'su') { ... } if (all($foo, $bar) >= 10) { ... } if (qr/^d+$/ == all(@answers)) { ... } if (all(@input) <= @limits) { ... } if (none(@pass) eq 'password') { ... } if (one(@answer) == 42) { ... } DESCRIPTION
This is a lightweight module which provides 'Junction' operators, the most commonly used being "any" and "all". Inspired by the Perl6 design docs, <http://dev.perl.org/perl6/doc/design/exe/E06.html>. Provides a limited subset of the functionality of Quantum::Superpositions, see "SEE ALSO" for comment. Notice in the "SYNOPSIS" above, that if you want to match against a regular expression, you must use "==" or "!=". Not "=~" or "!~". You must also use a regex object, such as "qr/d/", not a plain regex such as "/d/". SUBROUTINES
all() Returns an object which overloads the following operators: '<', '<=', '>', '>=', '==', '!=', 'lt', 'le', 'gt', 'ge', 'eq', 'ne', Returns true only if all arguments test true according to the operator used. any() Returns an object which overloads the following operators: '<', '<=', '>', '>=', '==', '!=', 'lt', 'le', 'gt', 'ge', 'eq', 'ne', Returns true if any argument tests true according to the operator used. none() Returns an object which overloads the following operators: '<', '<=', '>', '>=', '==', '!=', 'lt', 'le', 'gt', 'ge', 'eq', 'ne', Returns true only if no argument tests true according to the operator used. one() Returns an object which overloads the following operators: '<', '<=', '>', '>=', '==', '!=', 'lt', 'le', 'gt', 'ge', 'eq', 'ne', Returns true only if one and only one argument tests true according to the operator used. ALTERING JUNCTIONS
You cannot alter junctions. Instead, you can create new junctions out of old junctions. You can do this by calling the "values" method on a junction. my $numbers = any(qw/1 2 3 4 5/); print $numbers == 3 ? 'Yes' : 'No'; # Yes $numbers = any( grep { $_ != 3 } $numbers->values ); print $numbers == 3 ? 'Yes' : 'No'; # No EXPORT
'all', 'any', 'none', 'one', as requested. All subroutines can be called by its fully qualified name, if you don't want to export them. use Perl6::Junction; if (Perl6::Junction::any( @questions )) { ... } WARNING
When comparing against a regular expression, you must remember to use a regular expression object: "qr/d/" Not "/d/". You must also use either "==" or "!=". This is because "=~" and "!~" cannot be overriden. TO DO
Add overloading for arithmetic operators, such that this works: $result = any(2,3,4) * 2; if ($result == 8) {...} SUPPORT
/ BUGS Submit to the CPAN bugtracker <http://rt.cpan.org> SEE ALSO
Quantum::Superpositions provides the same functionality as this, and more. However, this module provides this limited functionality at a much greater runtime speed, with my benchmarks showing between 500% and 6000% improvment. <http://dev.perl.org/perl6/doc/design/exe/E06.html> - "The Wonderful World of Junctions". AUTHOR
Carl Franks ACKNOWLEDGEMENTS
Thanks to "Curtis "Ovid" Poe" for the "ALTERING JUNCTIONS" changes in release 0.40000. COPYRIGHT AND LICENSE
Copyright 2005, Carl Franks. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself (perlgpl, perlartistic). perl v5.18.2 2013-08-21 Perl6::Junction(3)
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy