Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/bin/sh Datei=textdatei exec 0<"$Datei" line_count=`wc $Datei | awk '{ print $1 }'` # Zeilen in Datei for line in `seq $line_count` do read line echo $line done exit 0 |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ for i in $(cat test);do echo $i;done /ora_2/test/DBTEST33/system01.dbf /ora_2/test/DBTEST33/undotbs01.dbf /ora_2/test/DBTEST33/indx01.dbf /ora_2/test/DBTEST33/tools01.dbf /ora_2/test/DBTEST33/users01.dbf $ x=0;for i in $(cat test);do echo $x: $i;x=$(($x+1));done 0: /ora_2/test/DBTEST33/system01.dbf 1: /ora_2/test/DBTEST33/undotbs01.dbf 2: /ora_2/test/DBTEST33/indx01.dbf 3: /ora_2/test/DBTEST33/tools01.dbf 4: /ora_2/test/DBTEST33/users01.dbf $ x=0;for i in $(cat test);do eval y$x=$i;x=$(($x+1));done $ echo $y2 /ora_2/test/DBTEST33/indx01.dbf |