03-03-2012
Quote:
If a record has a carriage return (octal 015) then I append the second record to the first record.
Please explain this process in minute detail and include before and after sample data which shows where the carriage-return character(s) may be found in a record and whether you need to RETAIN the carriage-return characters in the output or REMOVE them.
Is this one of those cases where carriage-return characters are valid in a string within a database record?
10 More Discussions You Might Find Interesting
1. Programming
hi
i have a peculiar problem...i have a number of stirngs separated by a '/0'. it looks somethings like:
char test="abk\0jsdhj\01234\0"
actually i will be reading this from a file or something...
im supposed to change the \0 to a ','
but in C the octal representation starts with a '\'...... (1 Reply)
Discussion started by: strider
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there any way to display the permissions in octal format rather than "rwxrwxrwx" format.
I have a file and i want to see the permissions in octal format. Please help. (11 Replies)
Discussion started by: venkatesht
11 Replies
3. Shell Programming and Scripting
Hi All,
can some one figure out the syntax issue here. How to overcome this?
#!/bin/sh
$ HFR_MAIL=NO
$ PRP_MAIL=NO
$ MC_MAIL=NO
$ if && && ]; then
> echo "NO "
> else
> echo "YES"
> fi
test: unknown operator NO
$ if && && ]; then
> echo "NO"
> else
> echo "YES"
>... (4 Replies)
Discussion started by: shellscripter
4 Replies
4. Shell Programming and Scripting
Hello everybody,
I would like to understand why the printf function is returning me an octal value with this command :
printf %4.4d 0010 returns 0008
printf %4.4d 10 returns 0010
Thanks for help. (3 Replies)
Discussion started by: dolphin06
3 Replies
5. Shell Programming and Scripting
Hi
what's the correct way of writing if
1)if "$time_diff" -gt 5
then
echo "killing hung process \n"
fi
2)if test $time_diff -gt 5
then
echo "killing hung process \n"
fi
where -time_diff=$(($Sam - $current_min))
and current_min=`date +%M`
infact both are giving Syntax... (1 Reply)
Discussion started by: Anteus
1 Replies
6. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
7. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
8. UNIX for Dummies Questions & Answers
I have some junk values in my files
鵶„‰¼±¤¡ad. am able to find the octal values as below by using od command.
303 251 265 266 204 211 274 261 244 241 141 144
i want to know how to delete the octal this values . (5 Replies)
Discussion started by: vino.paal
5 Replies
9. UNIX for Dummies Questions & Answers
Hi guys here i'm again with more question
The code below try to find an user and write everything about him if exist, so my problem appear on line of test, where the program test if the user has secondary groups related. The rest it's clear
# usugrup.sh lista todas las caracteristicas de un... (3 Replies)
Discussion started by: Newer
3 Replies
10. Shell Programming and Scripting
Here are a few lines from my script. The problem I am having is that the statement for gstat returns this error:
line 43:
The statement is coming from gstat.
Is there a way to fix it? Apparently -eq 02 is coming up as some octal value, I need it to be recognized as 02.
Apparently in... (4 Replies)
Discussion started by: newbie2010
4 Replies
ASA(1) BSD General Commands Manual ASA(1)
NAME
asa -- interpret carriage-control characters
SYNOPSIS
asa [file ...]
DESCRIPTION
The asa utility reads files sequentially, mapping FORTRAN carriage-control characters to line-printer control sequences, and writes them to
the standard output.
The first character of each line is interpreted as a carriage-control character. The following characters are interpreted as follows:
<space> Output the rest of the line without change.
0 Output a <newline> character before printing the rest of the line.
1 Output a <formfeed> character before printing the rest of the line.
+ The trailing <newline> of the previous line is replaced by a <carriage-return> before printing the rest of the line.
Lines beginning with characters other than the above are treated as if they begin with <space>.
EXIT STATUS
The asa utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
To view a file containing the output of a FORTRAN program:
asa file
To format the output of a FORTRAN program and redirect it to a line-printer:
a.out | asa | lpr
SEE ALSO
f77(1)
STANDARDS
The asa utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
AUTHORS
J.T. Conklin, Winning Strategies, Inc.
BSD
May 9, 2002 BSD