Hey - my first post here, and I'm a total SED newb. I've looked around for previous help on this, but have so far been unsuccessful.
I have a program (AMStracker for OS X) that outputs data in the terminal. Output is in this form:
.
.
.
3 0 -75
3 0 -76
3 0 -77
... (4 Replies)
Hi,
i want to append a character '|' at end of each line of a file abc.txt.
for example if the file abc.txt conatins:
a|b|c
1|2|33
w|2|11
i want result file xyz.txt
a|b|c|
1|2|33|
w|2|11|
I know this is simple but sumhow i am not able to reach end of line.
its urgent, thanks for... (4 Replies)
Hi Guys,
I have a file like this:
aaa b c d e f
fsss g h i k l
qqq r t h n
I want:
aaa b c d e f
fsss g h i k l
qqq r t h , n
ggg p t e d u
qqq i o s , k (2 Replies)
Hi,
we are trying to process a csv file,in which we are getting data with line breaks.How to remove the line break character in the file?
when i try to print the line break charcter using od -c,it gives as '\n' character for both line break and line feed.
Please provide your valuable... (6 Replies)
I need to remove new line character from end of file.
Suppose here are content.
a|b|c|d|r
a|b|c|d|r
a|b|c|d|r
<new line>
that means file contains 4 lines but data is there in 3 lines.
so I want that only 3 lines should be there in file.
Please help (20 Replies)
Good afternoon:
im working wih 2 files to find differences and use the cmp command
cmp file1 file2
file1 file2 are are diifferent char 302 line1
i found what the difference is with the sed command and that is the file1 at the end of every line has a (,) (comma) character.
i.e
sed -n... (4 Replies)
I have a file with different record length. The file as to be converted into fixed length by appending spaces at the end of record. The length should be calculated based on the record with maximum length in the file.
If the length is less than the max length, the spaces should be appended... (4 Replies)
how to Remove comma as last charector in end of last line of file:
example:
input file
---------------
aaaaaa,
bbbbbb,
cccc,
12345,
____________
output file :
-----------
aaaaaa,
bbbbbb, (6 Replies)
Hi All,
Could any one suggest how to remove $ symbol in a text file when i am opening in vi editor.
Scenario;
For example iam having a file name aaa.txt the data inside the file is like
sample
name
when i am opening in vi editor
The same file resembles like below when i am... (1 Reply)
I have a huge file which contains multiple lines. It need to check whether character length is not more than 255 each line. If its not then it should remove the
character up to column. I have described in the output below. If its more than that
the next line should start with call but if the... (1 Reply)
Discussion started by: JoshvaPeter
1 Replies
LEARN ABOUT SUNOS
realpath
realpath(3C) Standard C Library Functions realpath(3C)NAME
realpath - resolve pathname
SYNOPSIS
#include <stdlib.h>
char *realpath(const char *restrict file_name, char *restrict resolved_name);
DESCRIPTION
The realpath() function derives, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution
does not involve ".", "..", or symbolic links. The generated pathname is stored as a null-terminated string, up to a maximum of {PATH_MAX}
bytes (defined in limits.h(3HEAD)), in the buffer pointed to by resolved_name.
RETURN VALUES
On successful completion, realpath() returns a pointer to the resolved name. Otherwise, realpath() returns a null pointer and sets errno
to indicate the error, and the contents of the buffer pointed to by resolved_name are left in an indeterminate state.
ERRORS
The realpath() function will fail if:
EACCES Read or search permission was denied for a component of file_name.
EINVAL Either the file_name or resolved_name argument is a null pointer.
EIO An error occurred while reading from the file system.
ELOOP Too many symbolic links were encountered in resolving file_name.
ELOOP A loop exists in symbolic links encountered during resolution of the file_name argument.
ENAMETOOLONG The file_name argument is longer than {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
ENOENT A component of file_name does not name an existing file or file_name points to an empty string.
ENOTDIR A component of the path prefix is not a directory.
The realpath() function may fail if:
ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
ENOMEM Insufficient storage space is available.
USAGE
The realpath() function operates on null-terminated strings.
Execute permission is required for all the directories in the given and the resolved path.
The realpath() function might fail to return to the current directory if an error occurs.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO getcwd(3C), limits.h(3HEAD), sysconf(3C), attributes(5), standards(5)SunOS 5.10 9 Oct 2003 realpath(3C)