Vi lab moving line 9 to line 5 does not work for me

Hello Guys, does anyone knows what is the command to change line 9 to line 5 in the vi lab. Tried (dd) to cut and paste (p) on to line 5 but it did not worked, I was in command mode did I had to be in last-line mode in order to work or should I had scape and :w! ?

Thanks in advance

  1. Go to line 9 by typing :9 and pressing Enter.
  2. Enter visual line mode by pressing V (that’s uppercase ‘v’).
  3. Cut the line by pressing d.
  4. Go to line 5 by typing :5 and pressing Enter.
  5. Paste the line above line 5 by pressing P (that’s uppercase ‘p’).

thanks, I will try this out and let you know

how to go line 9 ? already how to read line i have never seen before

Read the post I made for full details.

Hi, I’ve used every step in your solution but I still get errors… do you have any idea?

You must not be following the instructions exactly as they are without making some mistake.

Still didn’t work :frowning:
Works after saving the file.
Thank you :slight_smile:

Yes - you need to save the file.

I also faced the same issue and tried with the method that you mentioned here but it’s still showing incorrect.

Please post the commands you are entering to try and solve this problem. I can confirm my instructions work and they have been verified.