LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Seeking advice with shell script (homework) (https://www.linuxquestions.org/questions/linux-newbie-8/seeking-advice-with-shell-script-homework-4175576825/)

BW-userx 04-07-2016 08:40 PM

is
Code:

1 20week
a result you think your teacher is looking for? that is the only flaw I see if it would be concedered a flaw because it does not separate the 20-week to 20 week but gives 20week instead.

I changed only one tr and got this result instead. A separation of the 20 and week.
Code:

      2 prices
      2 a
      1 weeks
      1 week
      1 unusual
      1 two
      1 trend
      1 the
      1 steady
      1 rose
      1 penny
      1 past
      1 only
      1 of
      1 mostly
      1 in
      1 half
      1 gas
      1 gallon
      1 continuing
      1 an
      1 20

Can you guess which one it is? The answer is in this post somewhere. :D

sobey 04-07-2016 09:28 PM

Quote:

Originally Posted by BW-userx (Post 5527933)
is
Code:

1 20week
a result you think your teacher is looking for? that is the only flaw I see if it would be concedered a flaw because it does not separate the 20-week to 20 week but gives 20week instead.

I changed only one tr and got this result instead. A separation of the 20 and week.
Code:

      2 prices
      2 a
      1 weeks
      1 week
      1 unusual
      1 two
      1 trend
      1 the
      1 steady
      1 rose
      1 penny
      1 past
      1 only
      1 of
      1 mostly
      1 in
      1 half
      1 gas
      1 gallon
      1 continuing
      1 an
      1 20

Can you guess which one it is? The answer is in this post somewhere. :D

I can not guess... I think you changed the tr ' ' '\n' string.

grail 04-07-2016 10:24 PM

Look at punctuation option and see if you can make it something else :)

BW-userx 04-08-2016 04:05 PM

I already gave the answer before that post


All times are GMT -5. The time now is 12:40 AM.