Sponsored Content
Top Forums Shell Programming and Scripting Setting a variable within if block Post 302345046 by cola on Tuesday 18th of August 2009 09:38:55 AM
Old 08-18-2009
It doesn't work in ubuntu.
This is the output:
Code:
Outside 9559 9803
Inside 9559 9803
Inside 1
Output 9559 9803
Outside

Are you using AIX?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

setting CC variable

I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler." What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies

2. Programming

setting CC variable

I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler." What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies

3. UNIX for Dummies Questions & Answers

Setting a variable

I want to set a variable to be any number of dashes. Rather than doing the following: MYVAR="------------------" I'd like to be able to set the variable to, say, 80 dashes but don't want to have to count 80 dashes. Is there a way to do this? (2 Replies)
Discussion started by: photh
2 Replies

4. UNIX for Dummies Questions & Answers

setting PS1 variable

Hi, I am trying to set my current prompt with the current directory iam working on by $PS1=$PWD but it is blank. please help. (4 Replies)
Discussion started by: papachi
4 Replies

5. Shell Programming and Scripting

Variable setting help please

L=0 cat test.sh | while read line do L='expr $1 + 1' echo $L done echo $l >>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
Discussion started by: penfold
16 Replies

6. UNIX for Dummies Questions & Answers

Setting a variable (need syntax help)

I need some syntax help (working in a bash shell) I have a variable which is a filename with an extension, and I need to create another variable with the same name but a different extension To explain, the input file should be called something like "filename.L1" and the output file should be... (1 Reply)
Discussion started by: Slanter
1 Replies

7. Shell Programming and Scripting

Setting variable

How do you set a varible with information that contains a string and also another variable? For example: subject="Attention: $name / This $type needs your attention" The $xxxx are of course other variables that I instantiated earlier. Is it like Java where you have to use double quotes and... (1 Reply)
Discussion started by: briskbaby
1 Replies

8. UNIX for Dummies Questions & Answers

setting a variable

In my script, I have the following command.... du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}' it returns the value 383283 I want to modify my script to capture that value into a variable. So, I try doing the following... var1=`du -sk `ls -ltd sales12|awk '{print... (5 Replies)
Discussion started by: tumblez
5 Replies

9. Shell Programming and Scripting

Help with setting a variable!

I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat. how can i do this??? ... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

10. UNIX for Dummies Questions & Answers

setting the PS1 variable

Hi i'm new to unix, can anyone assist in me setting the PS1 variable in unix (3 Replies)
Discussion started by: user@123
3 Replies
Finding Objects Inside a CPU set(3)			     Hardware Locality (hwloc)			       Finding Objects Inside a CPU set(3)

NAME
Finding Objects Inside a CPU set - Functions static inline hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set) int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *restrict objs, int max) static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, unsigned idx) static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx) static inline unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth) static inline int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type) static inline int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology , hwloc_const_cpuset_t set, hwloc_obj_t obj) Function Documentation static inline hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_ttopology, hwloc_const_cpuset_tset) [static] Get the first largest object included in the given cpuset set. Returns: the first object that is included in set and whose parent is not. This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set. Note: This function cannot work if the root object does not have a CPU set, e.g. if the topology is made of different machines. int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_t *restrictobjs, intmax) Get the set of largest objects covering exactly a given cpuset set. Returns: the number of objects returned in objs. Note: This function cannot work if the root object does not have a CPU set, e.g. if the topology is made of different machines. static inline unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth) [static] Return the number of objects at depth depth included in CPU set set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype) [static] Return the number of objects of type type included in CPU set set. If no object for that type exists inside CPU set set, 0 is returned. If there are several levels with objects of that type inside CPU set set, -1 is returned. Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth, hwloc_obj_tprev) [static] Return the next object at depth depth included in CPU set set. If prev is NULL, return the first object at depth depth included in set. The next invokation should pass the previous return value in prev so as to obtain the next object in set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype, hwloc_obj_tprev) [static] Return the next object of type type included in CPU set set. If there are multiple or no depth for given type, return NULL and let the caller fallback to hwloc_get_next_obj_inside_cpuset_by_depth(). Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. static inline int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_tset, hwloc_obj_tobj) [static] Return the logical index among the objects included in CPU set set. Consult all objects in the same level as obj and inside CPU set set in the logical order, and return the index of obj within them. If set covers the entire topology, this is the logical index of obj. Otherwise, this is similar to a logical index within the part of the topology defined by CPU set set. static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth, unsignedidx) [static] Return the (logically) idx -th object at depth depth included in CPU set set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype, unsignedidx) [static] Return the idx -th object of type type included in CPU set set. If there are multiple or no depth for given type, return NULL and let the caller fallback to hwloc_get_obj_inside_cpuset_by_depth(). Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.4.1 Mon Feb 27 2012 Finding Objects Inside a CPU set(3)
All times are GMT -4. The time now is 05:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy