10-12-2012
Have a look at the man page of "fmt". "fmt -50" is probably what you want.
I hope this helps.
bakunin
This User Gave Thanks to bakunin For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can anyone please give me the grep command to find all the lines in a file
that exceed 80 columns
Thanks,
gubbala (8 Replies)
Discussion started by: mrgubbala
8 Replies
2. Shell Programming and Scripting
Hi
I have the fixed width flat file having the following data
12345aaaaaaaaaabbbbbbbbbb
12365sssssssssscccccccccc
12365sssss
12367ddddddddddvvvvvvvvvv
12367 vvvvv
Here the first column is length 5 second is length 10 third is length 10
if the second or third column exceeds... (3 Replies)
Discussion started by: Brado
3 Replies
3. Shell Programming and Scripting
Hello,
I am currently trying to edit an ldif file. The ldif specification states that a newline followed by a space indicates the subsequent line is a continuation of the line. So, in order to search and replace properly and edit the file, I open the file in textwrangler, search for "\r " and... (14 Replies)
Discussion started by: rowie718
14 Replies
4. Shell Programming and Scripting
I need to add "new lines" of text with special characters, to specific lines in the file. There are 3 modifications needed. Been testing 2 here without success.
#!/usr/bin/perl
use FileHandle;
$file=FileHandle->new;
$FILENAME="/opt/etc/usr/file.txt";
$file->open ("<$FILENAME") or die... (13 Replies)
Discussion started by: A4ron4perl
13 Replies
5. UNIX for Dummies Questions & Answers
how do i Display only the first two characters of all the lines from a file.? (1 Reply)
Discussion started by: ritusubash
1 Replies
6. Shell Programming and Scripting
Hey,
I have to take one CSV file and break into more files. Let's I have a file prices.csv and the data in the file like
1,12345
1,34567
1,23456
2,67890
2,77720
2,44556
2,55668
10,44996
based on the first column, I want to create files. in this example 1 is repeated three times... (12 Replies)
Discussion started by: bond2222
12 Replies
7. Shell Programming and Scripting
Hi there, I'm looking for a way to remove all lines that don't contain chinese characters from an xml file.
Example: http://pastebin.com/8KzSbCKe
The result should be like this: http://pastebin.com/ZywXsNhx
Only lines that don't contain chinese characters should be deleted. If theres a mix of... (3 Replies)
Discussion started by: g4rb4g3
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
BUD31 YRI 2e-06:CXorf15 YRI 3e-06:CREB1 YRI 4e-06
FLJ21438 CEU 3e-07:ETS1 CEU 8e-07:FGD3 CEU 2e-06
I want to modify the text file so that everytime there is a ":", a new line is introduced so that the document looks... (3 Replies)
Discussion started by: evelibertine
3 Replies
9. Shell Programming and Scripting
Replace first 3 characters in a unix file (say replace "A&B" with "C&D") in all lines of the file. Need a sed or awk script to do this. Kindly help!
-Kumar (4 Replies)
Discussion started by: vasan2815
4 Replies
10. Shell Programming and Scripting
Hi,
I've 2 queries.
I need to list files which doesn't contain a particular text in the content. For example say, I need to list files which doesn't contain string "abc" from all files ending with *.bad. How can I do that?
Also, I want to display number of lines in a file which has atleast... (2 Replies)
Discussion started by: Gangadhar Reddy
2 Replies