I would like to prompt for input and then use it as a variable in a script.
Something like this.
#!/bin/ksh
echo "What is your name?: \c"
read response
echo "Your name is $reply" >file.txt
done
exit 0
What am I missing?
Thanks, (7 Replies)
Greetings to all,
I would like to read input from a file and make duplications from it with Linux shell.
For e.g.
Input file
-----------
ABC
ABB
ABA
-------------------------------
Output file
------------
ABC
ABC
ABC
ABB
ABB (6 Replies)
#!/bin/sh
rpt="/export/home/legato/rpt_offsite"/test_eject.tape
cat <$rpt
while read line
do
echo $line
perform routine
done
I am trying to read the contents of this file line by line and perform a routine for each line read.
The file contents are numbers..
What is wrong with my... (1 Reply)
First I' d like to say you guys are awesome. :)
I have a word document that I cut and paste into Textpad and it removed all the fancy formatting which is fine with me. I WinScp'd it to the box and and called it inputfile.txt.
Opened it in vi and don't see any special characters or stuff that... (2 Replies)
I am trying to read input for a C program (that expects input from the user) from a file using the shell command:
progname < filename
but it seems that the program considers the char '<'
as the first input, hence causing an "error" in my program.
I checked it with another program and it... (2 Replies)
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Hello,
I've been trying to come up with a solution for the following problem; I have an input file with two columns and I want to print as an output the first column without any changes but for the second column, I want to divide it by its last value. Example input:
1 9
2 10
3 11
4 12
5... (14 Replies)
Hi,
I need to read the date from the input file. The format of the input file is as follows:
a_b_c_yyyymmdd.txt
I need to read the date(yyyymmdd) part from the name of the input file.
Would really appreciate if someone can help me in this regard
Thanks a lot. (1 Reply)
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
I am not able to capture the user input in this script(bash).There is prompt for user input.Could some one help me capture user input while reading afile?
while read line
do
echo "$i"
path1=$line
path2=`echo $line|sed s/new_dir/old_dir/`
echo "Do you want to replace?";... (4 Replies)
Discussion started by: parijat guh
4 Replies
LEARN ABOUT PLAN9
ctl
CTL(5) CTL file format of ASIM/LIP6/CAO-VLSI lab. CTL(5)NAME
ctl - Control Temporal Logic file format.
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
DESCRIPTION
This document describes the CTL file format used by moka(1) for model checking of finite states machine description.
This CTL file format subset is defined to enable classical CTL formulae description.
A CTL file is made of two parts: a declaration part and a formulae statement part.
The declaration part described types, constants, macros and all variables used in CTL formulae. It also describes assumption conditions
and initial conditions that have to be applied by moka(1) during the model checking.
The formulae statement part described all the CTL formulae that have to be verified.
All boolean and relational VHDL operators are supported (see vbe(5)) and also the 8 CTL operators AF, AG, AX, AU, EF, EG, EX and EU. The
CTL file format support also the imply boolean operator '->' and the equivalence operator '<=>'.
EXAMPLE -- user type definition
TYPE A_ETAT_TYPE IS (A_E0, A_E1);
TYPE B_ETAT_TYPE IS (B_E0, B_E1);
-- variables definition
VARIABLE A_NS, A_CS : A_ETAT_TYPE;
VARIABLE B_NS, B_CS : B_ETAT_TYPE;
VARIABLE ck : BIT;
VARIABLE data_in : BIT;
VARIABLE data_out : BIT;
VARIABLE reset : BIT;
VARIABLE ack : BIT;
VARIABLE req : BIT;
-- example of a macros definition
DEFINE def1 : BOOLEAN := ack='1';
-- the assigned value can be a constant
DEFINE c1 : BIT := '1';
-- the assumption condition
ASSUME ass1 := (reset='0');
-- the initial reset condition
-- be careful, the assumption condition is not applied
-- to the initial conditions.
RESET_COND init1 := (reset='1');
-- It is also possible to describe the first state
-- with the INITIAL keywork, as follows:
--
-- INITIAL init1 := ((A_CS=A_E0) AND (B_CS=B_E0));
--
-- formulae description statement part
begin
prop1 : EX( ack='1' );
prop2 : AG( req -> AF( ack ) );
prop4 : AU( req='1', ack='1');
end;
SEE ALSO moka(1)BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM /LIP6 August 5, 2002 CTL(5)