Timeline for how can I count and remove certain lines with condition in a CSV file?
Current License: CC BY-SA 4.0
25 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 27, 2021 at 22:59 | answer | added | Kusalananda♦ | timeline score: 0 | |
| S Sep 26, 2021 at 6:49 | history | suggested | Peregrino69 | CC BY-SA 4.0 |
improved formatting, spelling and grammar
|
| Sep 26, 2021 at 0:19 | review | Suggested edits | |||
| S Sep 26, 2021 at 6:49 | |||||
| Sep 25, 2021 at 21:24 | comment | added | Paul_Pedant | This code is simple awk -- Mac awk should be identical to GNU/awk here because no extensions are required. | |
| Sep 25, 2021 at 21:22 | comment | added | Paul_Pedant | Why does your question mention 3 and 5, but your code says 19? Why should that work? | |
| Sep 25, 2021 at 21:21 | comment | added | Paul_Pedant |
Did you actually type <myfile> ? That was probably intended to be a placeholder where you enter your own file name. The <myfile looks like an input redirection, and the > looks like an output redirection with a missing filename. That is probably why it complains about getting a newline at that point.
|
|
| Sep 25, 2021 at 19:18 | comment | added | Nasir Riley |
Unfortunately, I don't have access to a MacBook or the MacOS awk so you'll have to wait for input from someone who does. I was simply trying to get you to specify exactly what you need and what you had done and where it wasn't working so that someone else can help you.
|
|
| Sep 25, 2021 at 18:56 | history | edited | YKILYCHAN | CC BY-SA 4.0 |
added 177 characters in body; edited title
|
| Sep 25, 2021 at 18:49 | comment | added | YKILYCHAN | @NasirRiley already done it. Can you help me with the problem? I don' t know why my code doesn't give a result. | |
| Sep 25, 2021 at 18:45 | history | edited | YKILYCHAN | CC BY-SA 4.0 |
added 5 characters in body
|
| Sep 25, 2021 at 18:41 | comment | added | Nasir Riley | The expected output doesn't appear anywhere in your question so no one has any idea as to what you need. You need to post an example of exactly what you need and not just a vague description. | |
| Sep 25, 2021 at 18:40 | comment | added | YKILYCHAN | @NasirRiley already done so! Thank you for your input! | |
| Sep 25, 2021 at 18:39 | history | edited | YKILYCHAN | CC BY-SA 4.0 |
added 101 characters in body; edited tags
|
| Sep 25, 2021 at 18:37 | comment | added | Nasir Riley |
Like I said, add that and your expected output to your question so that it doesn't get lost in the comments. Also add to your question that you are using awk for MacOS and not the gnu awk or gawk.
|
|
| Sep 25, 2021 at 18:36 | comment | added | YKILYCHAN | @Paul_Pedant this two condition is 'and' | |
| Sep 25, 2021 at 18:34 | comment | added | YKILYCHAN | @NasirRiley I have use a awk command like the answer below, but it doesn't show the result. It shows 'quote>'. I don't know what happened. Does it have something to do with my laptop? I am using a Mac. | |
| S Sep 25, 2021 at 17:53 | history | edited | αғsнιη |
Replaced csv with tsv
|
|
| S Sep 25, 2021 at 17:53 | history | suggested | Abdullah Ibn Fulan | CC BY-SA 4.0 |
Replaced csv with tsv
|
| Sep 25, 2021 at 17:40 | answer | added | icarus | timeline score: 2 | |
| Sep 25, 2021 at 17:01 | review | Suggested edits | |||
| S Sep 25, 2021 at 17:53 | |||||
| Sep 25, 2021 at 16:44 | comment | added | Paul_Pedant | By the way, it is not CSV, it appears to be tab-separated. | |
| Sep 25, 2021 at 16:43 | comment | added | Paul_Pedant | Also, "not equal to 5 and containing character". Do you mean containing a non-numeric character, like "123q5" ? I note your input data contains a value which is length 5 and contains e -- what does that do ? Do you want the two conditions to be and or or ? | |
| Sep 25, 2021 at 15:36 | comment | added | Nasir Riley |
Edit your question and add what you tried and where it went wrong. Also, add clarity regarding what you want to do. You state that you want to count the values under column id that have more than three characters but then you want to remove the lines where the number if characters is not equal to five. Which one do you want? Add the expected output to your question to clarify this.
|
|
| S Sep 25, 2021 at 15:29 | review | First questions | |||
| Sep 26, 2021 at 0:19 | |||||
| S Sep 25, 2021 at 15:29 | history | asked | YKILYCHAN | CC BY-SA 4.0 |