Executing external code inline

Executing external code inline

Post by John Poltora » Tue, 02 Apr 2002 23:47:05



I have a situation where I want to set some variables in a general
purpose shell script but the values differ
according to a passed parameter. I want to be able to maintain and set
those variables from external files.

How can I do it?

eg

gen-pur aaa or zzz

gen-pur:-

abc=ABC
def=DEF
-----------
[want to run inline code from aaa or zzz here]
------------
ghi=GHI
path2=$path1:$PATH
mno=$abc$pqr$xyz

aaa:-

pqr=PQR
stu=STU
xyz=XYZ
path1=/usr/local/newpath

zzz:-

pqr=123
xyz=999
path1=/usr/local/oldpath

--
John

 
 
 

Executing external code inline

Post by laura fairhe » Wed, 03 Apr 2002 01:47:17



>I have a situation where I want to set some variables in a general
>purpose shell script but the values differ
>according to a passed parameter. I want to be able to maintain and set
>those variables from external files.

>How can I do it?

>eg

>gen-pur aaa or zzz

>gen-pur:-

>abc=ABC
>def=DEF
>-----------
>[want to run inline code from aaa or zzz here]
>------------
>ghi=GHI
>path2=$path1:$PATH
>mno=$abc$pqr$xyz

>aaa:-

>pqr=PQR
>stu=STU
>xyz=XYZ
>path1=/usr/local/newpath

>zzz:-

>pqr=123
>xyz=999
>path1=/usr/local/oldpath

>--
>John

Use the builtin '.' command in bourne shells. Details will be in the
shell man page.

byefrom

--

                # if you are bored crack my sig.
1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A
EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E
630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA
8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978
80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492

 
 
 

Executing external code inline

Post by John Poltora » Wed, 03 Apr 2002 04:47:41




>>I have a situation where I want to set some variables in a general
>>purpose shell script but the values differ
>>according to a passed parameter. I want to be able to maintain and set
>>those variables from external files.

>>How can I do it?

>>eg

>>gen-pur aaa or zzz

>>gen-pur:-

>>abc=ABC
>>def=DEF
>>-----------
>>[want to run inline code from aaa or zzz here]
>>------------
>>ghi=GHI
>>path2=$path1:$PATH
>>mno=$abc$pqr$xyz

>>aaa:-

>>pqr=PQR
>>stu=STU
>>xyz=XYZ
>>path1=/usr/local/newpath

>>zzz:-

>>pqr=123
>>xyz=999
>>path1=/usr/local/oldpath

>>--
>>John

>Use the builtin '.' command in bourne shells. Details will be in the
>shell man page.

>byefrom

Many thanks for the pointer - I'd never come across it before but it
looks to be exactly what I was looking for.

--
John

 
 
 

1. "extern inline" to "static inline" allows compile

Hi,

I can't compile 2.5.51 on an EV56 without this. Tested, boots.
There are a bunch of symbols in core_cia.h that break the build if they're
extern inline because they're only defined in the header now. Make them
static inline instead. (Important, since they're #defined to things like
inb)

Comments?

Matt

diff -Nru a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h
--- a/include/asm-alpha/core_cia.h      Thu Dec 12 16:59:06 2002

 #ifdef __KERNEL__

 #ifndef __EXTERN_INLINE
-#define __EXTERN_INLINE extern inline
+#define __EXTERN_INLINE static inline
 #define __IO_EXTERN_INLINE
 #endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Lowest priority -- Acrobat Reader 4 port (very) little problems

3. static inline, and extern inline in the kernel source

4. Looking for listserv software for SCO

5. why is "static inline" preferred over "extern inline"?

6. How to Install Linux Redhat 5.2

7. not inline code in kernel (reducing kernel size)

8. PostScrip Preview

9. csh: how to write C code inline in shell ?

10. inline code in the kernel

11. Porting C++ code with inline-assembly from Win to Linux - thoughts?

12. Inline code replacement utility

13. static inline code