Skip to main content
Formatting of error message
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

I am solving a Hackerrank question where the output is

A 25 27 50;B 35 37 75
C 75 78 80;D 99 88 76 

for input

A 25 27 50
B 35 37 75
C 75 78 80
D 99 88 76.

I am using ORS to do the above task. But I don't know why runtime error is coming?

awk 'NR%2 == 1?ORS=";":ORS="\n"'

Error coming is awkNR: cmd. line:1: Possible syntax error

awkNR: cmd. line:1: Possible syntax error

I am solving a Hackerrank question where the output is

A 25 27 50;B 35 37 75
C 75 78 80;D 99 88 76 

for input

A 25 27 50
B 35 37 75
C 75 78 80
D 99 88 76.

I am using ORS to do the above task. But I don't know why runtime error is coming?

awk 'NR%2 == 1?ORS=";":ORS="\n"'

Error coming is awkNR: cmd. line:1: Possible syntax error

I am solving a Hackerrank question where the output is

A 25 27 50;B 35 37 75
C 75 78 80;D 99 88 76 

for input

A 25 27 50
B 35 37 75
C 75 78 80
D 99 88 76.

I am using ORS to do the above task. But I don't know why runtime error is coming?

awk 'NR%2 == 1?ORS=";":ORS="\n"'

Error coming is

awkNR: cmd. line:1: Possible syntax error
Became Hot Network Question
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265
Markup, put actual command into question
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

I am solving a Hackerrank question where the output is A 25 27 50;B 35 37 75 C 75 78 80;D 99 88 76 for

A 25 27 50;B 35 37 75
C 75 78 80;D 99 88 76 

for input A 25 27 50 B 35 37 75 C 75 78 80 D 99 88 76. I

A 25 27 50
B 35 37 75
C 75 78 80
D 99 88 76.

I am using ORSORS to do the above task. But I don't know why runtime error is coming?

awk 'NR%2 == 1?ORS=";":ORS="\n"'

Error coming is awkNR: cmd. line:1: Possible syntax error

I am solving a Hackerrank question where the output is A 25 27 50;B 35 37 75 C 75 78 80;D 99 88 76 for input A 25 27 50 B 35 37 75 C 75 78 80 D 99 88 76. I am using ORS to do the above task. But I don't know why runtime error is coming?

Error coming is awkNR: cmd. line:1: Possible syntax error

I am solving a Hackerrank question where the output is

A 25 27 50;B 35 37 75
C 75 78 80;D 99 88 76 

for input

A 25 27 50
B 35 37 75
C 75 78 80
D 99 88 76.

I am using ORS to do the above task. But I don't know why runtime error is coming?

awk 'NR%2 == 1?ORS=";":ORS="\n"'

Error coming is awkNR: cmd. line:1: Possible syntax error

Source Link
Loading