Sponsored Content
Homework and Emergencies Homework & Coursework Questions Help with creating a simple shell script Post 302994162 by RudiC on Monday 20th of March 2017 04:34:49 AM
Old 03-20-2017
Quote:
Originally Posted by Scripter12345
.
.
.
• If the 2 files do exist, then display one of the two phrases, “The two files
are identical” or “The two files are not identical” then quit.
.
.
.
If you don't want to display either phrase at random, look into the diff or cmp commands...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help on creating shell script

Can some one smart here help I need to create a shell script that does this below using vi editor. decrypts a file (specified as an argument to the script) containing text which was encrypted using the ROT-13 algorithm. The decrypted text should be written to a new file leaving the input file... (1 Reply)
Discussion started by: master_6ez
1 Replies

2. Shell Programming and Scripting

Creating my first Shell Script

I have an assignment in my programming class to write a shell script that will use command line parameters, display the # of parameters, display all parameters on the command line and display the parameters $0-$9. I understand some of the code (I will be using 'n' to represent the count through... (1 Reply)
Discussion started by: plmahan
1 Replies

3. Shell Programming and Scripting

Creating a command history feature in a simple UNIX shell using C

I'm trying to write a history feature to a very simple UNIX shell that will list the last 10 commands used when control-c is pressed. A user can then run a previous command by typing r x, where x is the first letter of the command. I'm having quite a bit of trouble figuring out what I need to do, I... (2 Replies)
Discussion started by: -=Cn=-
2 Replies

4. Shell Programming and Scripting

creating a simple archiving script

Im trying to create a script to archive specified directories into a specified tarball backup file. This is what i want the input to look like ex. save -i '/bin/b*' -i '/bin/ls' -o backup this is what i have #!/bin/bash #save - backup file script unset myInput unset myOutput while... (3 Replies)
Discussion started by: lensmen
3 Replies

5. Shell Programming and Scripting

simple shell - how to get a parameter typed in a shell script

Hi, I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies

6. Shell Programming and Scripting

Creating simple shell program

Hi, I'm new to UNIX shell programming... can anyone help in doing the following : 1) create a text file named "Model File" having following columns : Name Number Physics Chemistry 2) prompt user to n rows enter the name, number, physics ,chemistry 3) display the entire columns and rows... (1 Reply)
Discussion started by: Mayuri P R
1 Replies

7. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

8. Shell Programming and Scripting

how to execute ksh simple shell script without creating .sh file

please help me to execute a simple shell script like for i in `ls echo $i done . i dont want to create a new sh file to execute it. Can i just type and execute it ? because I always this kind of simple for loops . Please help . Thanks (7 Replies)
Discussion started by: Sooraj_Linux
7 Replies

9. Shell Programming and Scripting

Creating IN list in PLSQL script dynamically by using shell script

Hi all, I have a PLSQL script which has a IN list where it takes some ids as input. For example SELECT * FROM EMPLOYEE WHERE EMPLOYEE_ID IN (comma separated list ) I want to run this quest inside a shell script but I would like to prepare the IN list dynamically where the employee ids... (1 Reply)
Discussion started by: LoneRanger
1 Replies

10. UNIX for Beginners Questions & Answers

Creating a simple ID Script

Hello everybody, :wall:I am new to Linux and I want to create a simple script on Ubuntu that will allow to make database with a few perimeters. create file and name it Database and complete it with any information id firstname lastname phone 0 1 2 3 4 ... (4 Replies)
Discussion started by: kkishore4580
4 Replies
XT-CREATE-XEN-CONFIG(8) 				 Perl Programmers Reference Guide				   XT-CREATE-XEN-CONFIG(8)

NAME
xt-create-config - Create a Xen configuration file for a new guest SYNOPSIS
xt-create-config [options] Filename Options: --output Specify the output directory to use. --extension Specify the file extension to use. General Options: --admins Specify some administrator accounts which should be created for use by the xen-shell. --template Specify the template file to use when creating the Xen configuration file. Help Options: --help Show this scripts help information. --manual Read this scripts manual. --version Show the version number and exit. Debugging Options: --verbose Be verbose in our execution. All other options from xen-create-image, such as the new IP address(es) to give to the new instance, will be passed as environmental variables. ABOUT
This script is invoked by xen-create-image after it has created and customised a new Xen guest. It is responsible for creating the configuration file which Xen will use to start the instance. The configuration file will be created in the directory /etc/xen using a template file to determine how the configuration file should be created. By default the script will use /etc/xen-tools/xm.tmpl as its input. INVOCATION
This script will be invoked by the xen-create-image script, rather than directly. This is because it will expect to receive the values to insert into the output template in as environmental variables. You could execute it manually via a long command line, but that is error-prone and probably not useful: hostname=foo.my.flat ip=192.168.1.2 ... xm-create-xen-config --output=/etc/xen --template=/etc/xen-tools/xm.tmpl ARGUMENT PASSING
This script will be invoked with a full copy of the arguments from xen-create-image in its environment, along with several command line arguments. This has several implications for customization. If you wish to setup a new variable in the output template such as "foo=bar" you could update the script to include "${foo}", then invoke xen-create-image with this environmental variable set. $ foo=bar xen-create-image --hostname=test.my.flat ... The environment will be duplicated/inheritted by this script when it is executed, and your variable will be included in the output file. For details on the template file syntax please see the documentation for the "Text::Template" perl module. (If you have the perldoc package installed you can read this with "perldoc Text::Template".) AUTHORS
Steve Kemp, http://www.steve.org.uk/ Axel Beckert, http://noone.org/abe/ StA~Xphane Jourdois LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010-2012 by The Xen-Tools Development Team. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. 4.3.1 2012-06-30 XT-CREATE-XEN-CONFIG(8)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy