Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • can you tell me how to make my script work i have updated the question ... added newly created code at the end ... where as your solution is really good .... is it possible to do with my code with liitle chnages pls look question updated Commented Jan 1, 2020 at 7:15
  • @genip26057 You're using $col in the awk code, but this would refer to column number col, and there's no col variable in the program. Therefore, $col is the same as $0, which is the complete line. Commented Jan 1, 2020 at 7:20
  • @genip26057 Also see unix.stackexchange.com/questions/50044/… Commented Jan 1, 2020 at 7:21
  • @can you modify the provide code to make it work ...pls Commented Jan 1, 2020 at 7:21
  • @genip26057 Note that you have not indicated in the slightest way what you expect that a user give as arguments to the script. In the first coed it seems to be column names, in the second, it's a (single) column number? Commented Jan 1, 2020 at 7:23