Sponsored Content
Full Discussion: Inputs from a file
Top Forums Shell Programming and Scripting Inputs from a file Post 97615 by mahendramahendr on Wednesday 1st of February 2006 03:25:32 AM
Old 02-01-2006
cat filename | paste - - | while read a b
do
vl=$(( a + b ))
echo $vl
done

if you are very particular to include your script to add the numbers, remove the line vl=$(( a + b )) and add your script name with variable a and b.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading in two inputs from a file

Hi all, I've been assigned the task of modifying a script which reads in names of tables from a list file, exports a 30 days worth of data from these tables, then deletes the table. The list file will now contain a table name and a number next to it indicating how many days to archive. I need... (1 Reply)
Discussion started by: MadHatter
1 Replies

2. Shell Programming and Scripting

redirecting serial inputs to a file?

i have an external device sending serial messages i want to connect this device to a serial port in my sun blade box and record those messages to a file, how can i read the serial port and write it to file? Thanks (4 Replies)
Discussion started by: guilartec
4 Replies

3. Shell Programming and Scripting

Validating inputs from a file

Hi, I have a file called inputs. Now that file has the values like this: 1 2 3 Now In my script called 'get.sh' I do this : exec < inputs read a b c d Now I know that there will not be any value in d. How can I check it. I need the exact condition for checking whether the variable has... (1 Reply)
Discussion started by: sendhilmani123
1 Replies

4. Shell Programming and Scripting

Checking the format of inputs in a file

Hi, I have a script that takes the contents of another file as inputs. Its assumed that there are 3 values in the input file that are seperated by '|'. I have to check in my script, whether the filed seperator used in the input file is '|' or not. If its not a '|' I have to print a error... (13 Replies)
Discussion started by: sendhilmani123
13 Replies

5. UNIX for Dummies Questions & Answers

How to set the File Paths for Inputs and Outputs

I have couple of shell scripts. Each shell script accepts command line argument as inputfilename. Each shell script creates a summary file, status file. All these files are stored in a particular directory...Eg InputFile is to be picked from /home/ProjectName/ftp_inputfiles/ Outputs are to... (1 Reply)
Discussion started by: Amruta Pitkar
1 Replies

6. Shell Programming and Scripting

How to read inputs from a file

Hello; Please I need to read inputs from a file change 1 or 2 things the output to another file. (1 Reply)
Discussion started by: jimoney
1 Replies

7. Shell Programming and Scripting

Scripting A Source File With User Inputs

I need to write what I thought would be a fairly simple 2-line UNIX script. It can be written PERL, csh, ksh...or whatever is easiest. The entire script will be: Begin Scipt source MySourceFile execute MyExecutable.exe End Script The problem is that MySourceFile can not be... (1 Reply)
Discussion started by: MMorrison
1 Replies

8. Shell Programming and Scripting

Take 10 user inputs and output to file?

I want a script that will prompt a user to enter 10 numbers and out put them into a file. This what I have so far, but isn't working. I'm guessing it's something easy I'm not seeing. Thanks for any help. #!/usr/bin/ksh echo "Enter 10 numbers" for i in 1 2 3 4 5 6 7 8 9 10 do read .... ... (8 Replies)
Discussion started by: AxlVanDamme
8 Replies

9. Shell Programming and Scripting

Storing user inputs into a file

Hi, Am trying to store the user inputs into a file, but the below code will store only the first line of the values. I need to store all the user input values which may contain one or more lines. Thanks in advance. echo "please enter file names"; read name; echo $name>/tmp/test (11 Replies)
Discussion started by: rogerben
11 Replies

10. Shell Programming and Scripting

Run .exe file with inputs file

Good morning .., I have a problem to run my object program. Before, I run my program in cygwin and there is no problem. When I tried in linux (ubuntu), the terminal said that space.exe : command not found. this is the code in my shell space.exe gr1 result space.exe: command not found... (2 Replies)
Discussion started by: weslyarfan
2 Replies
LedgerSMB::DBObject::Employee(3pm)			User Contributed Perl Documentation			LedgerSMB::DBObject::Employee(3pm)

NAME
LedgerSMB::DBObject::Employee - LedgerSMB class for managing Employees SYOPSIS
This module creates object instances based on LedgerSMB's in-database ORM. METHODS
The following method is static: new ($LedgerSMB object); save Saves an employee. Inputs required entity_id May not be undef start_date end_date dob date may not be undef role Not the database role. Either manager or user ssn sales manager_id employee_number search Returns a list of employees matching set criteria: employeenumber (exact match) startdate_from (start of date range) startdate_to (end of date range) first_name (partial match) middle_name (partial match) last_name (partial match) notes (partial match) Undef values match all values. set_entity_class Sets the entity class to 3. get_managers Retrieves a set of managers and attaches to $self->{all_managers} save_location Saves the location data for the contact. Inputs are standard location inputs (line_one, line_two, etc) save_contact Saves contact information. Inputs are standard contact inputs: entity_id contact_class contact description save_bank_account Saves a bank account to an employee. Standard inputs (entity_id, iban, bic) get_metadata() This retrieves various information vor building the user interface. Among other things, it sets the following properties: $self->{ar_ap_acc_list} = qw(list of ar or ap accounts) $self->{cash_acc_list} = qw(list of cash accounts) get Returns the employee record with all the inputs required for "save" populated. Also populates: locations List of location info contacts List of contact info notes List of notes bank account List of bank accounts save_notes Saves a note to an employee entity. Standard inputs (note, subject, entity_id) delete_contact required request variables: contact_class_id: int id of contact class contact: text of contact information person_id: int of entity_credit_account.id, preferred value delete_location Deletes a record from the location side. Required request variables: location_id location_class_id person_id Returns true if a record was deleted. False otherwise. delete_bank_account Deletes a bank account Requires: entity_id bank_account_id Returns true if a record was deleted, false otherwise. get_user_info Attaches the user_id and username to the employee object. If the user does not have manage_users powers, this will simply return false Copyright (C) 2007, The LedgerSMB core team. This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should have been included with your software. perl v5.14.2 2012-03-10 LedgerSMB::DBObject::Employee(3pm)
All times are GMT -4. The time now is 02:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy