Skip to main content
Tweeted twitter.com/#!/StackUnix/status/310700427278708736
fixed language
Source Link
Lesmana
  • 28.2k
  • 20
  • 85
  • 87

I have this command

$ cut -f2,3 AIS2F1 | grep [2-9][0-9]*  | cut -f1

So my second and third isfields are something like this

Ben 434
Me  12
you 56

So, I thought that the logic should be to cut the second and third linefield then grep numbernumbers that are bigger than 20 and then cut the first field and that. That should give me the name thatthat is on the same line with number that is bigger than 20, but it givegives me this output:

Ben 
Me
you 

instead of

Ben
you 

which is what I want, how can I fix this command?

I have this command

$ cut -f2,3 AIS2F1 | grep [2-9][0-9]*  | cut -f1

So my second and third is something like this

Ben 434
Me  12
you 56

So, I thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name that is on the same line with number that is bigger than 20, but it give me this output

Ben 
Me
you 

instead of

Ben
you 

which is what I want, how can I fix this command?

I have this command

$ cut -f2,3 AIS2F1 | grep [2-9][0-9]*  | cut -f1

So my second and third fields are something like this

Ben 434
Me  12
you 56

So, I thought that the logic should be to cut the second and third field then grep numbers that are bigger than 20 and then cut the first field. That should give me the name that is on the same line with number that is bigger than 20, but it gives me this output:

Ben 
Me
you 

instead of

Ben
you 

which is what I want, how can I fix this command?

help with multiple command one line Grepping number in a file

iI have this command $ cut -f2,3 AIS2F1 | grep [2-9][0-9]* | cut -f1

so$ mycut second-f2,3 andAIS2F1 third| isgrep something[2-9][0-9]* like this| cut -f1

So my second and third is something like this

Ben 434
Me  12
you 56

so, i thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name  that is on the same line with number that is bigger than 20, but it give me this output 

So, I thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name that is on the same line with number that is bigger than 20, but it give me this output

Ben 
Me
you 

instead of 

instead of

Ben
you 

which is what I want, how can iI fix this command? thank you in advance

help with multiple command one line

i have this command $ cut -f2,3 AIS2F1 | grep [2-9][0-9]* | cut -f1

so my second and third is something like this 
Ben 434
Me  12
you 56

so, i thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name  that is on the same line with number that is bigger than 20, but it give me this output 
Ben 
Me
you 

instead of 
Ben
you 

which is what I want, how can i fix this command? thank you in advance

Grepping number in a file

I have this command

$ cut -f2,3 AIS2F1 | grep [2-9][0-9]*  | cut -f1

So my second and third is something like this

Ben 434
Me  12
you 56

So, I thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name that is on the same line with number that is bigger than 20, but it give me this output

Ben 
Me
you 

instead of

Ben
you 

which is what I want, how can I fix this command?

Source Link
user1763658
  • 59
  • 1
  • 1
  • 6

help with multiple command one line

i have this command $ cut -f2,3 AIS2F1 | grep [2-9][0-9]* | cut -f1

so my second and third is something like this 
Ben 434
Me  12
you 56

so, i thought that the logic should be to cut the second and third line then grep number that bigger than 20 and then cut the first field and that should give me the name  that is on the same line with number that is bigger than 20, but it give me this output 
Ben 
Me
you 

instead of 
Ben
you 

which is what I want, how can i fix this command? thank you in advance