ℕʘʘḆḽḘ
ℕʘʘḆḽḘ

Reputation: 19375

how to create a file with the cmd?

I have a win7 machine and I use Git Shell (which seems to be Windows Powershell)

I am trying to follow the Lab 3 tutorial of GIT IMMERSION (http://gitimmersion.com/lab_03.html).

I do not know how to create a file named hello.rb with the contents below.

puts "Hello, World"

Any help is appreciated. Many thanks!

Upvotes: 1

Views: 1150

Answers (2)

user2226112
user2226112

Reputation:

The Git Shell is bash, not PowerShell.

echo 'puts "Hello, World"' > hello.rb

Upvotes: 1

Mike Zboray
Mike Zboray

Reputation: 40818

If it's Powershell, then use Set-Content

Set-Content hello.rb 'puts "Hello, World"'

Upvotes: 2

Related Questions