EX8 CAT not working

Good afternoon, I was trying to create the new SQL file “code.sql”, but when I input: “cat ex2.sql ex3.sql ex4.sql ex7.sql > code.sql”, also tried -init instead of > but nothing. I’m using Powershell.


What am I doing wrong? Thanks

Powershell syntax is a little different than bash. Try with commas: cat file1, file2, fileN > target.

Thank you for your reply. Still nothing. It’s not working, and honestly, Zed’s instructions aren’t clear at all, they are actually extremely confusing. He has you set up powershell and says to use windows 10, and then uses bash on a macbook for all his examples… That makes no sense. I have no idea how to proceed with this ex.

Finding your way around less than optimal or outdated instructions is part of learning to code. :wink:

If you post the error you got this time just like before, we’ll help you with that in this case.

I found out that on powershell the correct command is Get-Content ex2.sql, ex3.sql, ex4.sql, ex7.sql | Set-Content code.sql. I agree with it being part of the process, but when you pay for material, and didn’t get it for free like most of the other instructions, you expect a little more. Haven’t found this to be a great learning experience. He doesn’t do a good job explaining why things are the way they are, for example, Zed doesn’t explain the “IN” function well at all, and I am still confused by Sub-Select. I have used other guides in the past, and unfortunately I’m very disappointed in this one.

With that being said; I do appreciate all your help! Thank you!

1 Like

FWIW cat file1, file2 > file3 worked for me in Powershell.

FWIW 2: You could get a bash shell pretty easily with WSL on Windows. Might make it easier to work through the book.

A free service run by Zed A. Shaw for learncodethehardway.org.