Sponsored Content
Full Discussion: awk - input function
Top Forums Shell Programming and Scripting awk - input function Post 302075398 by vgersh99 on Friday 2nd of June 2006 11:11:24 AM
Old 06-02-2006
a slightly different approach, but still using 'getline':
Code:
  cmd="read line;echo ${line}"
  cmd | getline line
  close(cmd);

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

conversion of a input function to i18n

m using unix c with curses im trying out the conversion of an existing code in c to i18n for the japanese language. the problem is that, the input which is given as the japanese characters is not taken correctly. and what it outputs is question marks(i.e. ???), equivalent to the number o f... (4 Replies)
Discussion started by: nirnay_s
4 Replies

2. Shell Programming and Scripting

Split function input and output order

Dear Forum I'm Trying to use split function to split a string, but the output is not as the same order as of the string, please see simple example echo " " | nawk -v var="First;Second;Third;Fourth" ' BEGIN {split(var, arr,";") for(i in arr){print arr }}' The output is Second Third... (6 Replies)
Discussion started by: yahyaaa
6 Replies

3. Shell Programming and Scripting

function from shell input

Hi all i have the command called printer which needs a usernmae for example i would run the commnad printer <username> how can i write i quick script in perl that if the username is ab then write "denined" and if it is anything else it will work thanks Adam (1 Reply)
Discussion started by: ab52
1 Replies

4. Shell Programming and Scripting

function terminating if i give input as space or no input and enter

HI i have written a script to ask input from the user. this script should promote the user for y/n input. if user enters anyother input then y/n the script promotes him again. this below code is working fine for all the cases. except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies

5. UNIX for Dummies Questions & Answers

apply a function twice successively with the same input in awk program

Hi ! It is a general question. When an awk script looks like: #! bin/awk function example(i){ <body> } { example(1) #the function uses input_1 and return output_a } { example(2) #the function uses previous output_a as an input and returns... (15 Replies)
Discussion started by: beca123456
15 Replies

6. Homework & Coursework Questions

Function to Check if string input from user is alphabetic only

Good Evening. I'm new to C. Can you please help me. I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again. Here's my... (1 Reply)
Discussion started by: eracav
1 Replies

7. UNIX for Dummies Questions & Answers

Passing Input To Function

May i please know why is it printing the script name for $0 when i pass those parameters to function. #!/bin/bash -x usage() { echo "In Usage Function" echo $0 echo $1 echo $2 } echo "printing first time" echo $0 echo $1 echo $2 usage $0 $1 $2 Output: (2 Replies)
Discussion started by: Ariean
2 Replies

8. Shell Programming and Scripting

User input and run awk using the input

I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :). The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies

9. Shell Programming and Scripting

Passing Oracle function as file input to sqlplus

Apologies if this is the incorrect forum.There is an issue in the function call I am facing while calling the same from a unix shell scripts. Basically, I want the ref cursor to return values to a variable in sqlpus. The function call is currently saved in a ".txt" file in a unix location. I want... (7 Replies)
Discussion started by: amvip
7 Replies

10. Shell Programming and Scripting

Need help on awk for printing the function name inside each function

Hi, I am having script which contains many functions. Need to print each function name at the starting of the function. Like below, functionname() { echo "functionname" commands.... } I've tried like below, func=`grep "()" scriptname | cut -d "(" -f1` for i in $func do nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
XtSetKeyboardFocus(3)						   XT FUNCTIONS 					     XtSetKeyboardFocus(3)

NAME
XtSetKeyboardFocus - focus events on a child widget SYNTAX
XtSetKeyboardFocus(Widget subtree, Widget descendant); ARGUMENTS
subtree Specifies either the widget in the subtree structure which is to receive the keyboard event, or None. Note that it is not an error to specify None when no input focus was previously set. descendant Specifies the widget for which the keyboard focus is to be set. DESCRIPTION
If a future KeyPress or KeyRelease event occurs within the specified subtree, XtSetKeyboardFocus causes XtDispatchEvent to remap and send the event to the specified descendant widget. When there is no modal cascade, keyboard events can occur within a widget W in one of three ways: o W has the X input focus. o W has the keyboard focus of one of its ancestors, and the event occurs within the ancestor or one of the ancestor's descendants. o No ancestor of W has a descendant within the keyboard focus, and the pointer is within W. When there is a modal cascade, a widget W receives keyboard events if an ancestor of W is in the active subset of the modal cascade and one or more of the previous conditions is True. When subtree or one of its descendants acquires the X input focus or the pointer moves into the subtree such that keyboard events would now be delivered to subtree, a FocusIn event is generated for the descendant if FocusNotify events have been selected by the descendant. Simi- larly, when W loses the X input focus or the keyboard focus for one of its ancestors, a FocusOut event is generated for descendant if FocusNotify events have been selected by the descendant. SEE ALSO
XtCallAcceptFocus(3) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.3 XtSetKeyboardFocus(3)
All times are GMT -4. The time now is 09:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy