While loop, how to read from second line of text file

前端 未结 2 962
-上瘾入骨i
-上瘾入骨i 2020-12-30 11:34

i\'ve tried everything for the past 2 hours to get this working but my experience in shell and programming is limited.

I have a loop

while IFS=\",\"          


        
相关标签:
2条回答
  • 2020-12-30 12:09

    Use sed to "delete" the first line from the input passed to the while loop

    sed 1d $file | while ...
    do
             your statements here
    done
    
    0 讨论(0)
  • 2020-12-30 12:18

    A solution using awk:

    awk 'NR >= 2 { print }' < "$file"
    
    0 讨论(0)
提交回复
热议问题