Sponsored Content
Full Discussion: How to avoid the spaces?
Top Forums Shell Programming and Scripting How to avoid the spaces? Post 302918819 by RudiC on Thursday 25th of September 2014 04:29:02 PM
Old 09-25-2014
Try resetting the COLSEP char...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

2. UNIX for Dummies Questions & Answers

echo is suppressing multiple spaces.How to avoid it

I am reading a file and copying selected lines from the file into another using echo. For eg: while read line do if ((some logic to determine whether I need to copy the current line to another file)) then echo $line > tempfile fi done<srcfile The problem I have is the data in the file... (1 Reply)
Discussion started by: prathima
1 Replies

3. UNIX for Advanced & Expert Users

How to avoid polling???

Hi all, I have a directory where some process is keeping incremental/new log files. I need to code a program which will periodically poll this directory and if it founds a new file arrived then copy that new file to some other specific directory. We are OK with this polling approach. I just... (3 Replies)
Discussion started by: zing_foru
3 Replies

4. UNIX for Dummies Questions & Answers

how to append spaces(say 10 spaces) at the end of each line based on the length of th

Hi, I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is. I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies

5. Shell Programming and Scripting

How to avoid the space

Hi, I have some problem with following command. $path='pwd'.”/pack”; When I check the value in the variable path , it give the following output /tmp/new /pack The pwd will be /tmp/new Now the problem is the spaces is added between pwd and the appended path. I need the output like... (5 Replies)
Discussion started by: kalpeer
5 Replies

6. Shell Programming and Scripting

How to avoid CR after compression

Hi all, I am having few files which needs to be concted into a single file and then it is compressed and FTPed from the UNIX server to the Windows server. For the above purpose i am using gzip command to compress the files after concetenation. And i am FTP ing the compressed file in the... (3 Replies)
Discussion started by: Codesearcher
3 Replies

7. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

8. Solaris

Any way to avoid these errors?

Hello, this is solaris 10 on SF v440, I know below errors might go away if I put a new PS or put the original one back in socket but is there any other way to stop these errors from appearing in /var/adm/messages ? I do not want to put the failed PS1 in socket neither do we want to spend on... (5 Replies)
Discussion started by: upengan78
5 Replies

9. Shell Programming and Scripting

How to avoid the truncating of multiple spaces into a single space while reading a line from a file?

consider the small piece of code while read line do echo $line done < example content of example file sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the output is like sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the... (4 Replies)
Discussion started by: Kesavan
4 Replies
ELF_ERRMSG(3)						   BSD Library Functions Manual 					     ELF_ERRMSG(3)

NAME
elf_errmsg, elf_errno -- ELF library error message handling LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> int elf_errno(void); const char * elf_errmsg(int error); DESCRIPTION
When an error occurs during an ELF library API call, the library encodes the error using an error number and stores the error number inter- nally for retrieval by the application at a later point of time. Error numbers may contain an OS supplied error code in addition to an ELF API specific error code. An error number value of zero indicates no error. Function elf_errno() is used to retrieve the last error recorded by the ELF library. Invoking this function has the side-effect of resetting the ELF library's recorded error number to zero. The function elf_errmsg() returns a null-terminated string with a human readable description of the error specified in argument error. A zero value for argument error retrieves the most recent error encountered by the ELF library. An argument value of -1 behaves identically, except that it guarantees a non-NULL return from elf_errmsg(). RETURN VALUES
Function elf_errno() returns a non-zero value encoding the last error encountered by the ELF library, or zero if no error was encountered. Function elf_errmsg() returns a pointer to library local storage for non-zero values of argument error. With a zero argument, the function will return a NULL pointer if no error had been encountered by the library, or will return a pointer to library local storage containing an appropriate message otherwise. EXAMPLES
Clearing the ELF library's recorded error number can be accomplished by invoking elf_errno() and discarding its return value. /* clear error */ (void) elf_errno(); Retrieving a human-readable description of the current error number can be done with the following snippet: int err; const char *errmsg; ... err = elf_errno(); if (err != 0) errmsg = elf_errmsg(err); SEE ALSO
elf(3), gelf(3) BUGS
Function elf_errmsg() is not localized. BSD
June 11, 2006 BSD
All times are GMT -4. The time now is 10:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy