[Solved] perl oneliner to read file line by line and skip some words by position

[ad_1]

perl -lane 'splice @F, 2, 3; print "@F"'
  • -l removes newlines from input and adds them to output
  • -n reads the input line by line, running the code for each line
  • -a splits each line on whitespace into the @F array
  • splice removes three elements from @F starting with position 2 (numbering starts at 0)

1

[ad_2]

solved perl oneliner to read file line by line and skip some words by position