• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

help with linux bash terminal commands!! (1 Viewer)

samuraitor

BoS lover
Joined
Sep 27, 2006
Messages
150
Gender
Male
HSC
2006
hey folks


Had a question regarding unix commands. I want to store a calendar produced by the "cal" command in the file "calendar" with no modifications to the output of the "cal" command.

I do this cal > calendar , and linuxgym says that the file does not have correct contents

How can I do this?
 

icraig88

Can I Kick It?
Joined
Jun 15, 2006
Messages
942
Location
Burwood
Gender
Male
HSC
2006
id assume that cal = calculator. im a complete noob when it comes to linux bash terminal though.
 

Slidey

But pieces of what?
Joined
Jun 12, 2004
Messages
6,600
Gender
Male
HSC
2005
Really?

cal > calendar works fine for me. Ubuntu 5.04.

Perhaps make sure you have permission to create a file in the directory. Trying cd'ing to your home directory or something then trying. Alternatively, try creating the file 'calendar', then running the command.

This isn't Windows and generally it shouldn't matter whether you call it calendar or calendar.txt.
 

withoutaface

Premium Member
Joined
Jul 14, 2004
Messages
15,098
Gender
Male
HSC
2004
samuraitor said:
hey folks


Had a question regarding unix commands. I want to store a calendar produced by the "cal" command in the file "calendar" with no modifications to the output of the "cal" command.

I do this cal > calendar , and linuxgym says that the file does not have correct contents

How can I do this?
That particular linuxgym exercise asks you to store the calendar for the year, not the month. Try cal -y > calendar
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top