User Tools

Site Tools


Action unknown: copypageplugin__copy
public:shell_files_and_arrays

Shell: files and arrays

- if you want to process an array

ARR="uno due tre"
for i in ${ARR}
do
      echo $i
done

- if you want to read the file file.txt line by line

for f in `cat mynamesfile.txt`
   do
       echo " 'user' = '${f}';"
   done

- if you want to read the file file.txt line by line

while read line
do
    echo $line
done <file.txt


return to gimbo wiki home page

public/shell_files_and_arrays.txt · Last modified: by 127.0.0.1