Practise Exercises
Jeremy Sanders
October 2011
Here are some exercises to make sure you understand the material. Feel
free to invent your own.
- Search for Pettini et al (1999). What journal was it in?
- Print the 1st page of Kennicutt (1998), ApJ, 498, 541
- Find all papers with Carswell as the first author between 1990
and 2000
- Find papers authored by Andy Fabian on the Abell 1795 cluster,
after 2000
- Find all the papers which cite Navarro, Frenk & White, 1997,
ApJ, 490, 493
- What is the redshift of the Coma cluster?
- What is the position of NGC 1000 in B1950 coordinates?
- Use SkyView to make a simple X-ray map of the Centaurus cluster.
Save this image to disk as a fits file, get another image of the
cluster in optical (DSS) for a similar area of sky. Use ds9 to make
a contour map of the optical on the X-ray map.
- Make a file called me.txt containing your name. Can you
keep emacs running while you continue typing in your shell?
- Make a new subdirectory in you home directory, test1.
- Copy the file me.txt into the subdirectory as
me_copy.txt.
- Make sure you can use cd to move between your home
directory and that subdirectory.
- Rename the copy to me_renamed.txt. Can you rename it
when you are still in your home directory?
- Using echo and a shell redirection, add your date of
birth to the copy.
- Using ls compare the size of the two files and
understand why the size difference is what it is.
- Try using the diff command to compare the files.
- Delete the subdirectory and the copy of me.txt.
- Modify the permissions of me.txt so that no other users
besides yourself can read it.
- Using pine send me.txt to one of the group (or your favourite
email program).
- Try using date to add the date to the end of
me.txt.
- Put two copies of me.txt (choose your own file names)
into a new subdirectory (test2). Use gtar or
tar to backup that directory to test2.tar.gz.
- Use tar or gtar to restore the contents into a
directory test3.
- Type sleep 2000 &. Use ps to identify the
process. Use kill to get rid of it. Try using top
as well.
- How much disk space are you using in your home directory?
- Make two files, test.txt containing some text, and
test.dat containing the text `test.txt'. What command line
is required to use test.dat to print the contents of
test.txt?
- Make a file containing two columns of numbers. Use awk
to print out the average of each row and their sum. Use awk
to print the sum of each column.
- Sort the output of the previous exercise on the first and then
the second columns.
- Make a file containing text including the word red. Use
sed to substitute green for red.
- Use the find command to find all files called
*.txt in your home directory and subdirectories.
- Count the lines of the files listed from the above
find command.
- Add /home/username/testdir to your PATH environment
variable.
- Show the text `()
;&' using the echo command.
- Write a simple LATEX document to print out your name and your
previous university.
- Add a title, author and date to the document.
- Add a second paragraph containing the equations
,
,
,
,
.
- Add section heading before the first paragraph `Introduction',
and add a subsection heading before the second, `Equations'.
- Use emacs to spell check the document.
- Use emacs to search and replace 22 with 23.
- Use emacs to switch round the first and second paragraphs.
- Can you use emphasised, SMALL CAPS,
typewriter, and sans-serif?
- Make a table with two columns, e.g. `animal' and `can it
fly?'. Add some data entries to the table. Change the alignment of
the columns in the table.
- Add an equation environment to your document
(
begin{equation} ...
end{equation}) containing an
equation. Use a label to refer to the equation in your text.
- Use a label to refer to your table in your text.
- Generate points in a file (
, with
). Plot the
points. Also plot with lines between the points.
- Make the axis labels ``The X Axis'' and ``The Y Axis''.
- Generate a postscript file from the plot.
- Add
error bars to the plot, where
.
- Add a second data series of your own choosing.
- Take the postscript file from the plotting exercises and insert
it in your LATEX document.
- Make a table with three columns in the document (choose your own
data). Place horizontal lines before and after the rows.
- Take some papers from ADS and construct a BibTeX archive. Make
sure that you can use it within an article.
- For the more adventurous, take figure 6 from astro-ph/0109336,
and place it in your paper.
- Make a simple paper using the Monthly Notices style
file (for postgraduates only).
- Write a shell script to start two xterms.
- Write a shell script to take a list of files, and print out the
sorted list of the sizes of the files.
- Write a shell script to run latex three times on all its input
files. The script should then generate postscript and pdf files for
each.
- Write a shell script to rename all files call *.txt to
*.txt.old
- Write a script to multiply the first column of a file by 20.
- Write a script to generate
and
if
goes from 0 to 10
in steps of 0.1.
Practise Exercises
This document was generated using the
LaTeX2HTML translator Version 2008 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 -font_size 10pt -no_navigation exercises.tex
The translation was initiated by Jeremy Sanders on 2011-10-02
Jeremy Sanders
2011-10-02