Sponsored Content
Top Forums Shell Programming and Scripting Importing File fields into a script Post 302823887 by teefa on Thursday 20th of June 2013 02:29:55 AM
Old 06-20-2013
Importing File fields into a script

Hi All,

Kindly tell me how to import a file fields in a scripts

Code:
 
scripts=adder.sh  >> add values 
 
vi adder.sh  (for example)
 
N1=$1
N2=$2
N=$N1+$N2 
 
***********
file.txt 
 
2|1
3|4
5|6
3|5
 
************
i want output to be :  ./adder.sh file.txt 
 
gives me output  : 
 
3
7
11
8

plz send me ASAP
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Importing a unix file dump into a PC capable database

My development team has been trying to figure out how to import a unix data dump into SQL Server or convert it into an intermediate file format for several days. The data dump in question looks like this: $RecordID: 1<eof> $Version: 1<eof> Category: 1<eof> Poster: John Doe<eof>... (7 Replies)
Discussion started by: DaltonF
7 Replies

2. Shell Programming and Scripting

Importing dump file

Hi, I am trying to import 22 .dmp files but facing the problem with the last table file it never ends the import command, only the table is created but the rows of the table don't get imported. This is the problem with only ine table rest 21 tables are being imported properly. Thanks in... (2 Replies)
Discussion started by: anushilrai
2 Replies

3. Shell Programming and Scripting

Shell script for validating fields in a file

Hi, I have not used Unix in a very long time and I am very rusty. I would appreciate any help I can get from the more experienced and experts in Shell script. I am reading one file at a time from a folder. The file is a flat file with no delimeters or carriage return. Col1 through col6 is... (5 Replies)
Discussion started by: asemota
5 Replies

4. Shell Programming and Scripting

awk script to (un)/concatenate fields in file

Hi everyone, I'm trying to use the "join" function for more than 1 field. Since it's not possible as it is, I want to take my input files and concatenate the joining fields as 1 field (separated by "|"). I wrote 2 awk script to do and undo it (see below). However I'm new to awk and I'm certain I... (5 Replies)
Discussion started by: anthony.cros
5 Replies

5. Shell Programming and Scripting

importing functions from an external bash script

Hi all, I'm trying to import some functions I have saved in a file named functions.sh into a different script (protocol.sh). Can anybody show me how to do this? I tried source functions.sh as I would do at the terminal but source command cannot be found from within the script protocol.sh. ... (2 Replies)
Discussion started by: tevang
2 Replies

6. Shell Programming and Scripting

Importing a path/file into a bash script

Hey, I'm new here. Basically, I'm trying to make a bash script that affects a file of my choice. What I want to do is $./script.sh /path/to/file.jpg and then the bash script will know that variable=/path/to/file.jpg Thanks! (4 Replies)
Discussion started by: TFB
4 Replies

7. UNIX for Dummies Questions & Answers

Data Importing using shell script

Hi All, I have a .csv file pipe delimter.., I am using excel data import option for importing the data from a pipe delimter file to xls...I want to make this happen using shell script. Please let me know how can I do this using shell script. Regards, Deepti (2 Replies)
Discussion started by: gaur.deepti
2 Replies

8. Shell Programming and Scripting

importing variables from 1 file to another

hi i want to retrieve talespace, datafile's path , size and another size in following querry in shell Create Tablespace 'A' Datafile 'Some Path' Size '10G' extent management Local uniform size '64M'; from another file say 'A.txt' where i ll dumb data in sequence separated by commas... (2 Replies)
Discussion started by: Gl@)!aTor
2 Replies

9. AIX

Issue while importing Oracle Dump File on AIX 5.3

Hi All, I am facing one problem related to importing Oracle Dump file. We have two different version of AIX boxes with oracle (version 10.2.0.4.0) installed. On one AIX box (version 6.1) we are creating oracle dump file (*.dmp) using oracle exp utility and importing it onto another AIX box... (1 Reply)
Discussion started by: gunjan_thakur
1 Replies

10. UNIX for Advanced & Expert Users

Script to parse and compare information in two fields of file

Hello, I am working parsing a large input file1(field CFA) I have to compare the the file1 field(CFA byte 88-96) with the content of the file2(It contains only one field) and and insert rows equal in another file. Here is my code and sample input file: ... (7 Replies)
Discussion started by: GERMANOS
7 Replies
VST(5)						      VHDL subset of ASIM/LIP6/CAO-VLSI lab.						    VST(5)

NAME
vst VHDL structural subset. 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 ALLIANCE VHDL subset for structural descriptions. The declaration part of a structural description includes signal decalarations and component declarations. An internal signal can be declared of any type supported by the present VHDL subset except reg_bit and reg_vector. A component must be declared with exactly the same port description as in its entity specification. This means that local ports are to be declared with the same name, type and kind and in the same order. A structural description is a set of component instanciation statements. Instances' ports are connected to each other trough signals in a port map specification. Both explicit and implicit port map specifications are supported by the ALLIANCE VHDL subset. The present version of the VHDL compiler does not allow unconnected ports (the open mode is not supported). Only the concatenation operator (&) can be used in the actual part (effective signal conntected to a formal port) of a port map specifica- tion. EXAMPLES
Here is the description of an adder with an accumulator register. entity add_accu is port ( clk : in bit; command : in bit; data_in : in bit_vector (31 downto 0); data_out : out bit_vector (31 downto 0); cry_out : out bit; vdd : in bit; vss : in bit ); end add_accu; architecture structural of add_accu is signal eff_data : bit_vector (31 downto 0); -- effective operande signal adder_out : bit_vector (31 downto 0); -- adder's result signal accu_out : bit_vector (31 downto 0); -- accumulator component adder port (a : in bit_vector (31 downto 0); b : in bit_vector (31 downto 0); res : out bit_vector (31 downto 0)); end component; component and_32 port (a : in bit_vector (31 downto 0); cmd : in bit; res : out bit_vector (31 downto 0)); end component; component falling_edge_reg port (din : in bit_vector (31 downto 0); clk : in bit; dout : out bit_vector (31 downto 0)); end component; begin my_adder : adder port map (a => eff_data, b => accu_out, res => adder_out); my_mux : and_32 port map (cmd => command, a => accu_out, res => eff_data); my_reg : falling_edge_reg port map (din => adder_out, clk => clk, dout => accu_out); end; SEE ALSO
vhdl(5), vbe(5), asimut(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 October 1, 1997 VST(5)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy