Sponsored Content
Top Forums Shell Programming and Scripting how do I list my values one per line instead of across it? Post 302347923 by FlyingSquirrel on Thursday 27th of August 2009 01:45:45 AM
Old 08-27-2009
A couple of variations...

Code:
(cat <<EOF
var1
var2
var3
var4
EOF
) | awk '{print $0}'

or if you had your list in a file like suggested above...

Code:
awk '{print $0}' yourfile

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search list of values

I have a file which contains a list of search values $cat my.txt FTIP002671604 FTIP002702940 FTIP002703183 FTIP002414805 And lots of such search values. I have to search these valus in the current directory. Can we do this one command wihtout writing a script. Regards, Rahul. (1 Reply)
Discussion started by: rahulrathod
1 Replies

2. Shell Programming and Scripting

Comma Seperated List of Values

Hi, I have a comma seperated list of values: export list="red,blue,white,yellow" Given a value in a variable "look", i want to check whether the value is available in the above list. But the result should be based on exact string match and not part of the string. I am using following... (9 Replies)
Discussion started by: brap45
9 Replies

3. Shell Programming and Scripting

grep a list of values

Hi everybody! :) :D :D :) it's great to be here since this is my first post. touch /base/oracle/FRA/XMUT00/RMAN_FLAG touch /base/oracle/FRA/XRLL00/RMAN_FLAG find directory name containing RMAN_FLAG : $ find /base/oracle/FRA -name RMAN_FLAG -print|xargs -n1 dirname |sort -u... (3 Replies)
Discussion started by: jolan_louve
3 Replies

4. Shell Programming and Scripting

Print pipe separated list as line by line in Korn Shell

Korn Shell in AIX 6.1 I want to print the below shown pipe (|) separated list line by line. line=es349889|nhb882309|ts00293|snh03524|bg578835|bg37900|rnh00297|py882201|sg175883 for i in line do echo "Hello $line " done I wanted to execute the above for loop. But i can't even set the... (3 Replies)
Discussion started by: polavan
3 Replies

5. Shell Programming and Scripting

how to use loops to take the values line by line

Hi am using aix ... I have tried so far but am getting unknown test operator error for example i have three files in one dir ... A2008 A2408 A2808 final output results should be A0108 is missing --- A1908 is missing A2108 is missing ..... #! /bin/ksh i=`ls A* |cut -c2-3` j=`date... (3 Replies)
Discussion started by: Venkatesh1
3 Replies

6. Shell Programming and Scripting

Sed Comparing Parenthesized Values In Previous Line To Current Line

I am trying to delete lines in archived Apache httpd logs Each line has the pattern: <ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL> This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
Discussion started by: Proteomist
1 Replies

7. Shell Programming and Scripting

How to find the X highest values in a list depending on the values of another list with bash/awk?

Hi everyone, This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file): ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Discussion started by: jeremy589
1 Replies

8. Shell Programming and Scripting

Replace values in script reading line by line using sed

Hi all, Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE. for pa in PA_VALUE blah blah do for pb in PB_VALUE blah blah do I have a text file with two columns of values for PA and PB. 14.5 16.7 7.8 9.5 5.6 3.6 etc etc I would like to read this... (7 Replies)
Discussion started by: crimsonengineer
7 Replies
GET_CLASS_VARS(3)							 1							 GET_CLASS_VARS(3)

get_class_vars - Get the default properties of the class

SYNOPSIS
array get_class_vars (string $class_name) DESCRIPTION
Get the default properties of the given class. PARAMETERS
o $class_name - The class name RETURN VALUES
Returns an associative array of declared properties visible from the current scope, with their default value. The resulting array elements are in the form of varname => value. In case of an error, it returns FALSE. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.0.3 | | | | | | | get_class_vars(3) will only return the properties | | | that can be accessed from the current scope. | | | | | 5.0.2 | | | | | | | Calling get_class_vars(3) will now expose all | | | the properties as an array, unlike previous be- | | | haviour where protected and private properties | | | were prefixed with nul bytes. | | | | | 5.0.1 | | | | | | | Calling get_class_vars(3) will expose all prop- | | | erties, as when converting an object to a class. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 get_class_vars(3) example <?php class myclass { var $var1; // this has no default value... var $var2 = "xyz"; var $var3 = 100; private $var4; // constructor function myclass() { // change some properties $this->var1 = "foo"; $this->var2 = "bar"; return true; } } $my_class = new myclass(); $class_vars = get_class_vars(get_class($my_class)); foreach ($class_vars as $name => $value) { echo "$name : $value "; } ?> The above example will output: var1 : var2 : xyz var3 : 100 Example #2 get_class_vars(3) and scoping behaviour <?php function format($array) { return implode('|', array_keys($array)) . " "; } class TestCase { public $a = 1; protected $b = 2; private $c = 3; public static function expose() { echo format(get_class_vars(__CLASS__)); } } TestCase::expose(); echo format(get_class_vars('TestCase')); ?> The above example will output: // 5.0.0 a| * b| TestCase c a| * b| TestCase c // 5.0.1 - 5.0.2 a|b|c a|b|c // 5.0.3 + a|b|c a SEE ALSO
get_class_methods(3), get_object_vars(3). PHP Documentation Group GET_CLASS_VARS(3)
All times are GMT -4. The time now is 10:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy