08-24-2015
Again: how is that file created - NOT modified! - ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can anyone please help me: i'm trying to read a file with directory-names , then go to that directory and read another (output) file to perform some tasks per line (second read line in the part of script below).
The problem is that after the nested while loop has finished, the first while... (7 Replies)
Discussion started by: Rakker
7 Replies
2. UNIX for Dummies Questions & Answers
HELLO all :),
I have been trying to use a simple while loop to read a file " templist", line by line and perform an action. See the code below. The reason for not using a while read line loop is the for the use of the if condition that wouldn't work. I would appreciate some ideas as this has... (2 Replies)
Discussion started by: kabs
2 Replies
3. Shell Programming and Scripting
Hi All,
How can we use read line using the index value of a FOR loop?
eg:
pt_mstr,pt_status,8
pt_mstr,pt_buyer,8
pt_mstr,pt_sfty_stk,8
pt_mstr,pt_ord_pol,3
pt_mstr,pt_capacity,8
pt_mstr,pt_plan_ord,3
pt_mstr,pt_ord_mult,8
From this file i want to read the line2, 3 and 4 only using a FOR... (3 Replies)
Discussion started by: balajim
3 Replies
4. Shell Programming and Scripting
Hi I'm writing a bash script which will read an input file and look for occurrences of the current user ($USER) executing the script. When i find the occurrence of the username I take that line and append it to a file with a line number and bracket display next to line.
The input file has been... (12 Replies)
Discussion started by: BundBash
12 Replies
5. Shell Programming and Scripting
Hi
I am using while loop, below, to read lines from a very large file, around 400,000 rows. The script works fine until around line 300k but then starts giving incorrect result.
I have tried running the script with a smaller data set and it works fine. I made sure to include the line where... (2 Replies)
Discussion started by: saurabhkumar198
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to read a file line by line inside of a while loop. This while loop is part of a here document.
while read line
do
ssh -t $2@$remotehost <<REMOTE
ls path/to/dir > $path_to_dir
while read line1
do
echo "LINE --- $line"
done... (4 Replies)
Discussion started by: mnanavati
4 Replies
7. Shell Programming and Scripting
I have written a script to read the file line by line.
It is reading and printing the lines.
But it is coming out of loop before reading last line.
So I am not able to print last line.
How do I solve it. (6 Replies)
Discussion started by: dgmm
6 Replies
8. Shell Programming and Scripting
#!/bin/bash
count=1
while read line
do
if (($count > 4)); then
awk -v var1="$count" '{printf "%3s%8s%11s%11s%11s\n",var1,$2,$3,$4,$5}'
else
echo $line
fi
count=$((count+1))
done < posre_sub.itp > test
cat test
INPUT:
; position restraints for... (3 Replies)
Discussion started by: origamisven
3 Replies
9. Shell Programming and Scripting
Hi
As a newbe in scripting, i struggle hard with my first script.
What i want to do is, bringing data of two files together.
file1:
....
05/14/12-04:00:00 41253 4259 5135 5604 5812 5372
05/14/12-04:10:00 53408 5501 6592 7402 7354 6639
05/14/12-04:20:00 58748 6037 7292 8223... (13 Replies)
Discussion started by: IMPe
13 Replies
10. Shell Programming and Scripting
Hello,
I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop ,
while IFS=: read -r line
do
set $dsc=$line
echo 'printing line variable ' $line... (1 Reply)
Discussion started by: ParthThakkar
1 Replies
LEARN ABOUT HPUX
xmimmblookupstring
XmImMbLookupString(library call) XmImMbLookupString(library call)
NAME
XmImMbLookupString -- An input manager function that retrieves a composed string from an input method
SYNOPSIS
#include <Xm/XmIm.h>
int XmImMbLookupString(
Widget widget,
XKeyPressedEvent *event,
char *buffer_return,
int bytes_buffer,
KeySym *keysym_return,
int *status_return);
DESCRIPTION
XmImMbLookupString returns a string composed in the locale associated with the widget's input method and a KeySym that is currently mapped
to the keycode in a KeyPress event. The KeySym is obtained by using the standard interpretation of Shift, Lock and Group modifiers as
defined in the X Protocol specification.
An XIM will be created, but an XIC will not be created. One of the functions, XmImSetValues, XmImVaSetValues, or XmImGetXIC, needs to be
called to create an XIC.
widget Specifies the ID of the widget registered with the input manager
event Specifies the key press event
buffer_return
Specifies the buffer in which the string is returned
bytes_buffer
Specifies the size of the buffer in bytes
keysym_return
Specifies a pointer to the KeySym returned if one exists
status_return
Specifies the status values returned by the function. These status values are the same as those for the XmbLookupString function.
The possible status values are:
XBufferOverflow
The size of the buffer was insufficient to handle the returned string. The contents of buffer_return and keysym_return
are not modified. The required buffer size is returned as a value of the function. The client should repeat the call
with a larger buffer size to receive the string.
XLookupNone
No consistent input was composed. The contents of buffer_return and keysym_return are not modified and the function
returns a value of 0.
XLookupChars
Some input characters were composed and returned in buffer_return. The content of keysym_return is not modified. The
function returns the length of the string in bytes.
XLookupKeysym
A keysym value was returned instead of a string. The content of buffer_return is not modified and the function returns
a value of 0.
XLookupBoth
A keysym value and a string were returned. The keysym value may not necessarily correspond to the string returned. The
function returns the length of the string in bytes.
RETURN
Return values depend on the status returned by the function. Refer to the description of status values above.
RELATED
XmImGetXIM(3), XmImGetXIC(3), XmImRegister(3), XmImSetValues(3), and XmImUnregister(3).
XmImMbLookupString(library call)