Tag Archive

amateur astronomy awk bash be b[e] supergiant cartoon conference convert exoplanet fedora figaro fits fun history iraf jupiter latex linux magellanic clouds massive star matplotlib meteor mypaper ondrejov observatory optical paper peblo photo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

Multiple-line comment for shell scripts

How to comment a block of text without inserting the ‘#’ character to all lines? We just use a ‘<<COMMENT_STRING’ (COMMENT_STRING can be obviously whatever we want) before the line of text we want to comment out and ‘COMMENT_STRING’ after the last line. An example: <<HEADER_COMMENT This is a test comment – lol! HEADER_COMMENT [source1,source2] […]

Useful small things for c-shell

> When using if statement in c-shell you have to be careful with the syntax: if (condition) then (commands) endif or if you want to add another case then if (condition) then (commands) else (commands) endif Important to remember that after “then” you must continue to a new line. > “exit” is the one option […]

While loop in C-shell scripts

When using the while loop in C-shell scripting the usual stucture is: while (expression)commands…end BUT, you need to add an empty line or a comment after end in order for the loop to work!