07-06-2012
does this make sense?
0000000 2 0 1 0 / 0 8 / 1 9 0 3 : 5 3
0000020 \n K O A K 1 9 0 3 5 3 Z 2 9
0000040 0 1 3 K T 1 0 S M B K N 0 0
0000060 8 1 4 / 1 2 A 2 9 9 6 R M
0000100 K A O 2 S L P 1 4 4 T 0 1
0000120 4 4 0 1 2 2 \n 2 0 1 0 / 0 8 / 1
0000140 9 0 1 : 5 0 \n A Z U H 1 9 0
0000160 1 5 0 Z 0 0 0 0 0 K T C A V
0000200 O K 2 1 / 1 2 Q 1 0 0 9 A
0000220 2 9 8 1 \n 2 0 1 0 / 0 8 / 1 9
0000240 0 3 : 5 3 \n P A B R 1 9 0 3 5
0000260 3 Z 2 2 0 1 0 K T 1 0 S M
0000300 O V C 0 1 1 0 7 / 0 6 A 2 9
0000320 7 8 R M K A O 2 S L P 0 8
0000340 4 T 0 0 7 2 0 0 6 1 \n 2 0 1 0
0000360 / 0 8 / 1 9 0 3 : 5 6 \n
0000375
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello there,
I need to remove carriage return characters (\n and \r) from any input file specified. This is what I am doing right now:
- dumping the file to octal format using the command 'od -c file_name
- removing and \s and \n characters using sed commands
What I need to do now is... (3 Replies)
Discussion started by: b1saini
3 Replies
2. Shell Programming and Scripting
Hello,
I have a file that has got carriage returns in it and I want to take them out. Anyone know how I can do this in a ksh?
thanks (4 Replies)
Discussion started by: pitstop
4 Replies
3. Shell Programming and Scripting
I have a file with multiple records in it and want to create a single record by removing all the carriage returns, is there a sed command or another command that will easily allow this to happen.
current layout
813209A
813273C
812272B
expected result
813209A813273C812272B
previously I... (3 Replies)
Discussion started by: r1500
3 Replies
4. Shell Programming and Scripting
Hi,
I'm not very familiar with unix shell. I want to replace the combination of two carriage returns and one newline with one carriage return and one newline. I think the best way to do this is to use sed. I tried something like this:
sed -e "s#\#\#g" file.txt
but it doesn't work.
Thanx... (2 Replies)
Discussion started by: mored
2 Replies
5. Shell Programming and Scripting
Hello I'm trying to write a shell script which can remove a carriage return and/or line feed from a file, so the resulting file all ends up on one line.
So, I begin with a file like this
text in file!<CR>
line two!<CR>
line three!<CR>
END!<CR>
And I want to end up with a file... (1 Reply)
Discussion started by: tbone231
1 Replies
6. UNIX for Dummies Questions & Answers
I have a file that I have to place a carriage return at the end of each line for another program to process it. I also need to remove all spaces after the carriage return. I searched the forums and found this command, but it removes all spaces:
sed "s/*//g" ic527.txt > ic527.new
The... (9 Replies)
Discussion started by: jyoung
9 Replies
7. Shell Programming and Scripting
Hi, I am trying to remove the carriage return on the record which starts with ADD, MODIFY, or DELETE keyword as the first value in the record. If the records does not start with anyone of these keywords then combine the records with the previous record (line).
Input
File name xyz.txt... (6 Replies)
Discussion started by: naveed
6 Replies
8. Shell Programming and Scripting
Hi All,
I want to remove carriage return in a file using some unix command without writing a script
my file is as follows
abc1 abc2 abc3 abc4
abc5 bac6
abc1 abc2 abc3 abc4
abc5 bac6
I want the output as follows:
abc1 abc2 abc3 abc4 abc5 bac6
abc1 abc2 abc3 abc4 abc5 bac6
,
Please... (7 Replies)
Discussion started by: manish8484
7 Replies
9. Shell Programming and Scripting
Hello!
I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Discussion started by: xqwzts
1 Replies
10. Shell Programming and Scripting
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
1|ABC DEF|100|10
2|PQ
RS
T|200|20
3| UVWXYZ|300|30
4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies
LEARN ABOUT DEBIAN
rfio_chmod
RFIO_CHMOD(3) Rfio Library Functions RFIO_CHMOD(3)
NAME
rfio_chmod, rfio_fchmod - change access mode of a directory/file
SYNOPSIS
#include <sys/types.h>
#include "rfio_api.h"
int rfio_chmod (const char *path, mode_t mode);
int rfio_fchmod (int s, mode_t mode);
DESCRIPTION
rfio_chmod sets the access permission portion of the mode of a directory/file to the bit pattern in mode.
rfio_fchmod is identical to rfio_chmod but works on the file descriptor s returned by rfio_open.
path specifies the logical pathname relative to the current directory or the full pathname.
mode is constructed by OR'ing the bits defined in <sys/stat.h> under Unix or "statbits.h" under Windows/NT:
S_IRUSR 0000400 read by owner
S_IWUSR 0000200 write by owner
S_IXUSR 0000100 execute/search by owner
S_IRGRP 0000040 read by group
S_IWGRP 0000020 write by group
S_IXGRP 0000010 execute/search by group
S_IROTH 0000004 read by others
S_IWOTH 0000002 write by others
S_IXOTH 0000001 execute/search by others
The effective user ID of the process must match the owner of the file or be super-user. If a directory is writable and has the sticky bit
set, files/directories within that directory can be removed or renamed only if:
the effective user ID of the requestor matches the owner ID of the file or
the effective user ID of the requestor matches the owner ID of the directory or
the file is writable by the requestor or
the requestor is super-user.
RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
EPERM The effective user ID does not match the owner of the file and is not super-user.
ENOENT The named file/directory does not exist or is a null pathname.
EBADF s is not a valid file descriptor.
EACCES Search permission is denied on a component of the path prefix or write permission on the file itself is denied.
EFAULT path is a NULL pointer.
ENOTDIR A component of path prefix is not a directory.
ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
SEE ALSO
Castor_limits(4)
AUTHOR
LCG Grid Deployment Team
LCG
$Date: 2005/03/31 13:13:02 $ RFIO_CHMOD(3)