Hi all,
In a while loop, like below...
while read line
do
read choice
case $choice in
1)
echo "xxx"
esac
done < file
why I can't run the read choice???? (3 Replies)
Hi all
Does anyone have a script that will allow me to stop inside a while read loop.
I want to pause the loop until a enter is pressed.
e.g.
While read line
do
echo something
if LINECOUNT > 40
then
read ENTER?"PRESS ENTER TO CONT..."
... (3 Replies)
hi,
i have an existing ftp script that needs to be translated to SFTP so i have to use expect script to automate the login to the remote server.
Now im facing with a problem becaise i have at least 50 files to be renamed ont he remote server. It's a hassle to hardcode every single command... (1 Reply)
Hi there
I want to ask to a user something about each line of a file. This is my code:
#cat test.txt
first line
second line
third line
#cat test.sh
#!/bin/ksh
read_write () {
echo "Do you want to print the line (YES/NO)?\n"
read TEST
case ${TEST} in
YES) return 0;;
... (3 Replies)
This took me quite awhile to find so I wanted to share this with other people.
To switch windows in vimdiff or
to navigate windows in vimdiff or
to change windows in vimdiff try the following:
The ":vertical" command can be inserted before another command that
splits a window.
... (0 Replies)
Hi,
I am reading file records inside a while loop,
and want to update the record when certain condition is met.
How can I update a file while being read?
I want to avoid using temporary files, copy, rename, ...
while IFS=',' read -r f1 f2
do
function(f1,f2)
if
then
<add... (1 Reply)
Hi,
This query is a part of a much more lengthy script.
I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all the files found under data I wish to ask the user as to where they wish copy the files to.
Below,... (14 Replies)
Hi Experts,
Need your guidance for case statement. I tried many way but no success yet.Now my existing code is doing something like below. Each Line of the input file contains one test case.#!/bin/bash
FILE=$1
while read LINE; do
do COMMAND
done < $FILE
Now I want to modify the code... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
LEARN ABOUT CENTOS
xcb_dri2_copy_region_unchecked
xcb_dri2_copy_region(3) XCB Requests xcb_dri2_copy_region(3)NAME
xcb_dri2_copy_region -
SYNOPSIS
#include <xcb/dri2.h>
Request function
xcb_dri2_copy_region_cookie_t xcb_dri2_copy_region(xcb_connection_t *conn, xcb_drawable_t drawable, uint32_t region, uint32_t dest,
uint32_t src);
Reply datastructure
typedef struct xcb_dri2_copy_region_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
} xcb_dri2_copy_region_reply_t;
Reply function
xcb_dri2_copy_region_reply_t *xcb_dri2_copy_region_reply(xcb_connection_t *conn, xcb_dri2_copy_region_cookie_t cookie,
xcb_generic_error_t **e);
REQUEST ARGUMENTS
conn The XCB connection to X11.
drawable TODO: NOT YET DOCUMENTED.
region TODO: NOT YET DOCUMENTED.
dest TODO: NOT YET DOCUMENTED.
src TODO: NOT YET DOCUMENTED.
REPLY FIELDS
response_type
The type of this reply, in this case XCB_DRI2_COPY_REGION. This field is also present in the xcb_generic_reply_t and can be used
to tell replies apart from each other.
sequence The sequence number of the last request processed by the X11 server.
length The length of the reply, in words (a word is 4 bytes).
DESCRIPTION RETURN VALUE
Returns an xcb_dri2_copy_region_cookie_t. Errors have to be handled when calling the reply function xcb_dri2_copy_region_reply.
If you want to handle errors in the event loop instead, use xcb_dri2_copy_region_unchecked. See xcb-requests(3) for details.
ERRORS
This request does never generate any errors.
SEE ALSO AUTHOR
Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
XCB 2014-06-10 xcb_dri2_copy_region(3)