Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Write a C Shell script that will allow you to set the name of an input postsc

ID: 3889222 • Letter: 1

Question

1) Write a C Shell script that will allow you to set the name of an input postscript file and desired output name of a jpg file, and then use ImageMagick's convert command Gust google it to see how it works) to convert a postscript file into a jpeg image. E.g., At the very least I should enter, either by the command line or by interactive input the name of an input ps file, and desired name of output jpg file and the script will automatically create the jpg file. A ps file named seismograms.ps' is located at:/u0597445/GEO5210/seismograms.ps E.g., really simply (although you can make the code more fancy) you could use the convert command like: >>convert-compress Lossless -density 150x150 seismograms.ps seismograms.jpg

Explanation / Answer

#!/bin/csh

# Script to print user information who currently login ,

# current date & time

clear

echo

"Hello

$USER

"

echo

"Today is c "

;date

echo

"Number of user login :

c"

; who | wc –l

echo

"Calendar"

cal

#!/bin/csh

set

x = 1

set

y = 10.5

set

myvar = super

echo

$x $y $myvar

echo

$x + $y

#!/bin/csh

@ x =

1

@ x =

$x

+

10

echo

$x