10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please use code tags for sample data
Hi
I have a file where there are line feeds in the data. I am not able to read the file from an application. I exported this data from Access database and many columns contain line feed.
My data looks like this
abcd,efgh,ijkl,mnop
abcd,ef... (7 Replies)
Discussion started by: dnat
7 Replies
2. Shell Programming and Scripting
Hi! I have been struggling with a large file that has stray end of line characters.
I am working on a Mac (Lion). I mention this only because I have been mucking around with fixing my problem using sed, and I have learned far more than I wanted to know about Unix and Mac eol characters.
I... (1 Reply)
Discussion started by: user999991
1 Replies
3. Shell Programming and Scripting
Hello all,
I have data like
"1"|"My_name"|"My_Email"|"My_Last"|My_other"
"2"|"My_name"|"My_Email"|"My_Last"|My_other"
"3"|"My_name"|"My_Email"|"
"|My_other"
"1"|"My_name"|"My_Email"|"My_Last"|My_other"
Need output like
"1"|"My_name"|"My_Email"|"My_Last"|My_other"... (10 Replies)
Discussion started by: lokaish23
10 Replies
4. UNIX for Dummies Questions & Answers
Hi folks,
I did a search on this and didn't really find what fit my needs. I have a file with fixed record length of 436 bytes. I want to add a line feed x"0A" to the end x"0A" of each record(in byte 437). What's the easiest way to accomplish this?
Thanks. (5 Replies)
Discussion started by: keeferb
5 Replies
5. Shell Programming and Scripting
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies
6. Shell Programming and Scripting
I am have an issue with the carrige or line feed chars showing up on info converted to a pdf file from a Orcale tool. Any direction would be appericated.
ex.
John doe 12435 1 232344 1
Jane doe 12435 1 424343 1
when should be like this
John doe... (1 Reply)
Discussion started by: sherrod6970
1 Replies
7. Shell Programming and Scripting
I have a file called test.dat which contains
a b
I have written a shell script called test.sh
for i in `cat test.dat`
do
echo $i
done
When i run this script using
sh test.sh
I get this message -
test.sh: syntax error at line 6: `end of file' unexpected
What is the... (3 Replies)
Discussion started by: debojyoty
3 Replies
8. Shell Programming and Scripting
Hi
I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed.
Please advise how can i achieve this.
TIA
Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies
9. Shell Programming and Scripting
hi all,
i have csv file with three comma separated columns
i/p file
First_Name, Address, Last_Name
XXX, "456 New albany \n newyork, Unitedstates \n 45322-33", YYY\n
ZZZ, "654 rifle park \n toronto, canada \n 43L-w3b", RRR\n
is there any way i can remove \n (newline) from the second... (1 Reply)
Discussion started by: gowrish
1 Replies
10. UNIX for Dummies Questions & Answers
What tools can I use to accomplish this?
I'm writing a shell script to analyze an inittab file. Here's a sample file:
init:3:initdefault:
ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup </dev/console >/dev/console... (10 Replies)
Discussion started by: jpprial
10 Replies
COL(1) BSD General Commands Manual COL(1)
NAME
col -- filter reverse line feeds from input
SYNOPSIS
col [-bfhpx] [-l num]
DESCRIPTION
The col utility filters out reverse (and half reverse) line feeds so that the output is in the correct order with only forward and half for-
ward line feeds, and replaces white-space characters with tabs where possible. This can be useful in processing the output of nroff(1) and
tbl(1).
The col utility reads from the standard input and writes to the standard output.
The options are as follows:
-b Do not output any backspaces, printing only the last character written to each column position.
-f Forward half line feeds are permitted (``fine'' mode). Normally characters printed on a half line boundary are printed on the fol-
lowing line.
-h Do not output multiple spaces instead of tabs (default).
-l num Buffer at least num lines in memory. By default, 128 lines are buffered.
-p Force unknown control sequences to be passed through unchanged. Normally, col will filter out any control sequences from the input
other than those recognized and interpreted by itself, which are listed below.
-x Output multiple spaces instead of tabs.
In the input stream, col understands both the escape sequences of the form escape-digit mandated by Version 2 of the Single UNIX
Specification (``SUSv2'') and the traditional BSD format escape-control-character. The control sequences for carriage motion and their ASCII
values are as follows:
ESC-BELL reverse line feed (escape then bell).
ESC-7 reverse line feed (escape then 7).
ESC-BACKSPACE half reverse line feed (escape then backspace).
ESC-8 half reverse line feed (escape then 8).
ESC-TAB half forward line feed (escape than tab).
ESC-9 half forward line feed (escape then 9). In -f mode, this sequence may also occur in the output stream.
backspace moves back one column (8); ignored in the first column
carriage return (13)
newline forward line feed (10); also does carriage return
shift in shift to normal character set (15)
shift out shift to alternate character set (14)
space moves forward one column (32)
tab moves forward to next tab stop (9)
vertical tab reverse line feed (11)
All unrecognized control characters and escape sequences are discarded.
The col utility keeps track of the character set as characters are read and makes sure the character set is correct when they are output.
If the input attempts to back up to the last flushed line, col will display a warning message.
ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of col as described in environ(7).
EXIT STATUS
The col utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
colcrt(1), expand(1), nroff(1), tbl(1)
STANDARDS
The col utility conforms to Version 2 of the Single UNIX Specification (``SUSv2'').
HISTORY
A col command appeared in Version 6 AT&T UNIX.
BSD May 10, 2015 BSD