Sponsored Content
Homework and Emergencies Homework & Coursework Questions Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune" Post 302828313 by vbe on Tuesday 2nd of July 2013 09:02:32 AM
Old 07-02-2013
Well we are not going to do the work for you, you know that hum...
You seem to be quite lost ( were you listening during the course? ...) English is a second language for me so Im very cautious when it comes to understand assignments... not the same thing as to solve issues...
My understanding is that you are NOT to put in your shell script what you think but it is the expected output of the execution of your script: Not the same thing...
So the script you are to write has to produce for output the claendar 2014 on the left and the output of 2 files on the right,the pr code sample is a sample to me ... you may need to adapt...

Last edited by vbe; 07-02-2013 at 10:03 AM.. Reason: typos sorry i thinkmy dislexya is playing with me again...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Filtering/Finding a "Fortune" message

Hi, I have had a problem in Linux with the "Fortune" messages (unfortunately! :( ) and I need to trap the message again. It starts with a "IMPORTANT NOTICE". To capture this, I write a script as follows.. #!/bin/sh a=0 while ; do /usr/games/fortune >> fortune.txt a=`expr $a + 1` done... (4 Replies)
Discussion started by: oldtrash
4 Replies

2. Shell Programming and Scripting

Q: Recording shell script screen output using "script" command ?

Hello, I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work. I know there is a special unix command call "script" which records screen session but the... (4 Replies)
Discussion started by: lalfonso.gomez
4 Replies

3. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

4. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

5. Virtualization and Cloud Computing

Creating VirtualBox-Image as "harddisk" by shell-script

Hello, I'm trying to create a VirtualBox "harddisk" and put an dd-image into it. This image shoudn't work as a virtual maschine, I just want to be able to mount it to an folder. How can I do this with an shell script? Sebi ---------- Post updated at 10:36 AM ---------- Previous update... (0 Replies)
Discussion started by: Sebi0815
0 Replies

6. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

7. Shell Programming and Scripting

Creating a Shortcut (to just type "l" but it runs "ls -lah")

How do I create shortcuts? For example: I just want to type one key "l" and have it output the command of "ls -lah" I believe it's creating a file called l with 755 permissions but I'm not sure where to put the file. *if it matters, I'm on a shared hosting web server using cPanel with... (2 Replies)
Discussion started by: ijustsawmars
2 Replies

8. Shell Programming and Scripting

What is the right way to redirect script output use ">" or ">>" ?

Which one of the following are more accurate and why? nohup myScript.sh 1>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 & nohup myScript.sh 1>>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 & nohup myScript.sh >nohup_$(date +%Y%m%d%H%M%S).out 2>&1 & nohup myScript.sh >>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &... (3 Replies)
Discussion started by: kchinnam
3 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
OSACOMPILE(1)						    BSD General Commands Manual 					     OSACOMPILE(1)

NAME
osacompile -- compile AppleScripts and other OSA language scripts SYNOPSIS
osacompile [-l language] [-e command] [-o name] [-d] [-r type:id] [-t type] [-c creator] [-x] [-s] [-u] [-a arch] [file ...] DESCRIPTION
osacompile compiles the given files, or standard input if none are listed, into a single output script. Files may be plain text or other compiled scripts. The options are as follows: -l language Override the language for any plain text files. Normally, plain text files are compiled as AppleScript. -e command Enter one line of a script. Script commands given via -e are prepended to the normal source, if any. Multiple -e options may be given to build up a multi-line script. Because most scripts use characters that are special to many shell programs (e.g., AppleScript uses single and double quote marks, ``('', ``)'', and ``*''), the command will have to be correctly quoted and escaped to get it past the shell intact. -o name Place the output in the file name. If -o is not specified, the resulting script is placed in the file ``a.scpt''. The value of -o partly determines the output file format; see below. -x Save the resulting script as execute-only. The following options are only relevant when creating a new bundled applet or droplet: -s Stay-open applet. -u Use startup screen. -a arch Create the applet or droplet for the specified target architecture arch. The allowable values are ``ppc'', ``i386'', and ``x86_64''. The default is to create a universal binary. The following options control the packaging of the output file. You should only need them for compatibility with classic Mac OS or for cus- tom file formats. -d Place the resulting script in the data fork of the output file. This is the default. -r type:id Place the resulting script in the resource fork of the output file, in the specified resource. -t type Set the output file type to type, where type is a four-character code. If this option is not specified, the creator code will not be set. -c creator Set the output file creator to creator, where creator is a four-character code. If this option is not specified, the creator code will not be set. If no options are specified, osacompile produces a Mac OS X format script file: data fork only, with no type or creator code. If the -o option is specified and the file does not already exist, osacompile uses the filename extension to determine what type of file to create. If the filename ends with ``.app'', it creates a bundled applet or droplet. If the filename ends with ``.scptd'', it creates a bun- dled compiled script. Otherwise, it creates a flat file with the script data placed according to the values of the -d and -r options. EXAMPLES
To produce a script compatible with classic Mac OS: osacompile -r scpt:128 -t osas -c ToyS example.applescript SEE ALSO
osascript(1), osalang(1) Mac OS X November 12, 2008 Mac OS X
All times are GMT -4. The time now is 05:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy