Существуют ли обстоятельства, при которых ld игнорирует LD_LIBRARY_PATH?

попробуйте u. awk as

 BEGIN { FS="|" ; }
 {
   n=split($5,A,"&") ;
   for ( i=1; i <= n ; i++ ) {
       printf "%d-th & at position %d\n",i,length(A[i])+i ;
       split(A[i],B,":") i;
       printf "\t[%s] : [%s]\n",B[1],B[2] ;
   }
 }

given input as

column1|column2|column3|column4|variable1:value1 & variable2:value2 & variable3:value3 & variable4:value4|column6|column7|
COLn1|COLn2|COLn3|COLn4||COLn6|COLn7|
Tue Oct 13 10:56:50 CEST 2015

called with awk -f u.awk u

1-th & at position 18
    [variable1] : [value1 ]
2-th & at position 20
    [ variable2] : [value2 ]
3-th & at position 21
    [ variable3] : [value3 ]
4-th & at position 21
    [ variable4] : [value4]
  • note that empty 5th colum is treated in for( ... ) (as n is 0)
  • note also that white space are not treated.
  • Обновлено, чтобы дать позицию &
0
11.06.2018, 12:38
1 ответ

Por lo que sé, ldignora LD_LIBRARY_PATH, al menos para las bibliotecas especificadas en su línea de comando; LD_LIBRARY_PATHno aparece en las variables de entorno que lo afectan . hace referencia a LD_LIBRARY_PATHcuando busca bibliotecas que necesitan otras bibliotecas , en compilaciones nativas, emulando el comportamiento deld.so.

4
28.01.2020, 02:23

Теги

Похожие вопросы