Featured Post

sh read file line by line


#!/bin/bash

  while read LINE
  do

      IFS='/';
      read -r -a array <<< "$LINE"
      DATA='';
     for index in "${!array[@]}"
      do
         if [  $2 == "${array[index]}" ]
         then 
              DATA="${array[index]}"
               c=0;
               while [  $c -le $index ]
                do
                  
              echo -n "${array[c]}/"
                 c=$((  $c + 1  ));
                done
           echo ''
          fi
      done

   done < $1




read more

Comments

Popular posts from this blog

[Inside AdSense] Understanding your eCPM (effective cost per thousand impress...