Sponsored Content
Full Discussion: trouble with: read -d '\r'
Top Forums Shell Programming and Scripting trouble with: read -d '\r' Post 302360022 by cfajohnson on Thursday 8th of October 2009 03:07:35 AM
Old 10-08-2009

Code:
read < xf1
REPLY=${REPLY%$'\r'}

Or:

Code:
IFS=$' \t\r\n' read < xf1

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

The trouble about SU ...

Hi all, having read lots of posts about SU I don't quiet understand this : I'm doing regular backups of my database (u betta do) and therefore use su - username -c "sqlscript special data_base" in a unixscript which is even using cron. (yep!) Now I need some other script, still with this... (4 Replies)
Discussion started by: nulnul7
4 Replies

2. Solaris

Trouble with tr

I'm not sure where to post this but it's happening on a SunOS 5.8 server so I'll try here. I've discovered some unexpected behavior when using tr. For example: echo a | tr Z echo b | tr a echo a | tr B echo a | tr B echo a | tr A (8 Replies)
Discussion started by: Mike@Work
8 Replies

3. UNIX for Dummies Questions & Answers

X trouble

Hi there, I'm new to unix-environments. I'm richard, and i'm mostly a web-developer, under php. I've done work in unix env before, but never had my own. Today, I've got debian 3.1 r4 from the official site, and i've attempted to install it twice. I installed it initially as "Desktop... (0 Replies)
Discussion started by: izua
0 Replies

4. UNIX for Dummies Questions & Answers

trouble using read to store values in variables from command output

I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie. I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me. ... (2 Replies)
Discussion started by: ProGrammar
2 Replies

5. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

6. UNIX for Advanced & Expert Users

read() wont allow me to read files larger than 2 gig (on a 64bit)

Hi the following c-code utilizing the 'read()' man 2 read method cant read in files larger that 2gig. Hi I've found a strange problem on ubuntu64bit, that limits the data you are allowed to allocate on a 64bit platform using the c function 'read()' The following program wont allow to allocate... (14 Replies)
Discussion started by: monkeyking
14 Replies

7. Shell Programming and Scripting

Read Embedded Newline characters with read (builtin) in KSH93

Hi Guys, Happy New Year to you all! I have a requirement to read an embedded new-line using KSH's read builtin. Here is what I am trying to do: run_sql "select guestid, address, email from guest" | while read id addr email do ## Biz logic goes here done I can take care of any... (6 Replies)
Discussion started by: a_programmer
6 Replies

8. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

9. Shell Programming and Scripting

Help with Bash piped while-read and a read user input at the same time

Hi I am new to writing script and want to use a Bash Piped while-read and read from user input. if something happens on server.log then do while loop or if something happend on user input then do while loop. Pseudocode something like: tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies

10. Shell Programming and Scripting

[Bash] Read History function & Read Arrowkeys

Hi. How can I create a history function? (By "read" command or so) & How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A) Thanks in advance. (4 Replies)
Discussion started by: sinnlosername
4 Replies
Debugging(3m17n)						 The m17n Library						  Debugging(3m17n)

NAME
Debugging - Support for m17n library users to debug their programs. Functions MCharTable * mdebug_dump_chartab (MCharTable *table, int indent) Dump a chartable. MFace * mdebug_dump_face (MFace *face, int indent) Dump a face. MFont * mdebug_dump_font (MFont *font) Dump a font. MFontset * mdebug_dump_fontset (MFontset *fontset, int indent) Dump a fontset. MInputMethod * mdebug_dump_im (MInputMethod *im, int indent) Dump an input method. int mdebug_hook () Hook function called on an error. MText * mdebug_dump_mtext (MText *mt, int indent, int fullp) Dump an M-text. MPlist * mdebug_dump_plist (MPlist *plist, int indent) Dump a property list. MSymbol mdebug_dump_symbol (MSymbol symbol, int indent) Dump a symbol. MSymbol mdebug_dump_all_symbols (int indent) Dump all symbol names. Detailed Description Support for m17n library users to debug their programs. The m17n library provides the following facilities to support the library users to debug their programs. o Environment variables to control printing of various information to stderr. o MDEBUG_INIT -- If set to 1, print information about the library initialization on the call of M17N_INIT(). o MDEBUG_FINI -- If set to 1, print counts of objects that are not yet freed on the call of M17N_FINI(). o MDEBUG_CHARSET -- If set to 1, print information about charsets being loaded from the m17n database. o MDEBUG_CODING -- If set to 1, print information about coding systems being loaded from the m17n database. o MDEBUG_DATABASE -- If set to 1, print information about data being loaded from the m17n database. o MDEBUG_FONT -- If set to 1, print information about fonts being selected and opened. o MDEBUG_FLT -- If set to 1, 2, or 3, print information about which command of Font Layout Table are being executed. The bigger number prints the more detailed information. o MDEBUG_INPUT -- If set to 1, print information about how an input method is running. o MDEBUG_ALL -- Setting this variable to 1 is equivalent to setting all the above variables to 1. o MDEBUG_OUTPUT_FILE -- If set to a file name, the above debugging information is appended to the file. If set to 'stdout', the information is printed to stdout. o Functions to print various objects in a human readable way. See the documentation of mdebug_dump_XXXX() functions. o The hook function called on an error. See the documentation of mdebug_hook(). Author Generated automatically by Doxygen for The m17n Library from the source code. COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 Debugging(3m17n)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy