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
XtPopdown()															       XtPopdown()

Name
  XtPopdown - unmap a popup shell.

Synopsis
  void XtPopdown(popup_shell)
	 Widget popup_shell;

Inputs
  popup_shell
	    Specifies the widget shell to pop down.

Description
  XtPopdown()	   pops      down     a     popup     shell	and	calls	  the	  functions	registered     on     the     shell's
  XtNpopdownCallback list.  The "Algorithm" section below explains the details of this process.

Usage
  The Intrinsics also provide other convenience routines to pop down a popup shell.  To perform a pop down from a callback list, register the
  function XtCallbackPopdown().  To do so from a translation table, use the action XtMenuPopdown.

  Popup  shell widgets can be created with XtCreatePopupShell(), and can be popped up with XtPopup() or XtPopupSpringLoaded(), or with one of
  the built-in callback functions (XtCallbackExclusive(),  XtCallbackNonexclusive(),  or  XtCallbackNone()),  or  with	the  built-in  action
  XtMenuPopup.

Algorithm
  XtPopdown() performs the following:

  o  Calls XtCheckSubclass() to ensure popup_shell's class is a subclass of shellWidgetClass.

  o  Checks that the popped_up field of popup_shell is True; otherwise, it returns immediately.

  o  Unmaps  popup_shell's  window  and,  if override_redirect is False, sends a synthetic UnmapNotify event as specified by the Inter-Client
     Communications Conventions Manual.

  o  If popup_shell's grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls XtRemoveGrab().

  o  Sets popup_shell's popped_up field to False.

  o  Calls the callback procedures on the shell's popdown_callback list, specifying a pointer to the value of the shell's grab_kind field  as
     the call_data argument.

See Also
  XtCallbackPopdown(1), XtCreatePopupShell(1), XtMenuPopdown(1), XtPopup(1), XtPopupSpringLoaded(1), XtRemoveGrab(1).

Xt - Pop Ups															       XtPopdown()
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy