03-22-2009
Putting new line after certain number of character
Hi,
I want, if a line is more than 80 characters length then put a new line with 4 space after each 80 characters to indent the data at same position.
Input:
200 Geoid and gravity anomaly data of conjugate regions of Bay of Bengal and Enderby Basin: New constraints on breakup and early spreading history between India and Antarctica
330 Institute of Documentation training and teseting, Dona, Sasan
480 Frente maritimo. Montevideo
490 ^v7^p75-86
620 Aquatic communities%Benthos%Fishing grounds%Geomorphology%Topographic surveying%Hydrodynamic equations%Mathematical models%Tidal constants%Tidal constituents%Wind-driven currents
621 Sparus pagrus
485 1990
623 Red porgy
010 Marine
Output:
200 Geoid and gravity anomaly data of conjugate regions of Bay of Bengal and En
derby Basin: New constraints on breakup and early spreading history between
India and Antarctica
330 Institute of Documentation training and teseting, Dona, Sasan
480 Frente maritimo. Montevideo
490 ^v7^p75-86
620 Aquatic communities%Benthos%Fishing grounds%Geomorphology%Topographic surve
ying%Hydrodynamic equations%Mathematical models%Tidal constants%Tidal const
ituents%Wind-driven currents
621 Sparus pagrus
485 1990
623 Red porgy
010 Marine
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to separate Pascal style identifiers (TheyLookLikeThis) into words separated by an underscore (_).
I've tried sed 's//&_&/' but this won't work (obviously). I'd love some help. (4 Replies)
Discussion started by: Ilja
4 Replies
2. UNIX for Dummies Questions & Answers
I want to display "no results found" if a grep search of a name that the user inputs is not found anywhere in a certain file,
Right now I have this, but doesn't seem to work. Im not sure what to change.
read name
results=grep -c $name file
if ;
then echo "No results found."
exit... (1 Reply)
Discussion started by: busdude
1 Replies
3. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
4. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
5. Shell Programming and Scripting
Hi All, I have input file like this:
input1:
( 1083479)=T 158V 1798,
T 391V 1896,T 1138V 2273,T 1547V 2477,T 2249V 2917,T 3278V 3234,T 4152V 3495,T 5500V 3631,
( 1083501)=T 181V 1851,
T 459V 1954,T 810V 2141,T 1188V 2372,T 1638V 2696,T 2731V 3124,T 4799V 3640,... (5 Replies)
Discussion started by: attila
5 Replies
6. Shell Programming and Scripting
Good afternoon,
I have been searching the web, and these forums for help. I will try my best to explain the issue, and what my desired results are.
I am doing queries in MYSQL, and need the output to be sent to a file. That file needs to have things with the same ID on the same line. To... (14 Replies)
Discussion started by: brianjb
14 Replies
7. Shell Programming and Scripting
Hi Experts,
How to sepearate the list digit with letters : with a space from where the letters begins, or other words from where the digits ended.
file
52087mo(enbatl)
52049mo(enbatl)
52085mo(enbatl)
25051mo(enbatl)
The output should be looks like:
52087 mo(enbatl)
52049... (10 Replies)
Discussion started by: rveri
10 Replies
8. Shell Programming and Scripting
hi,
Is it possible to print a particular character n number of times in a line?
for example.
i am print the following line using echo command..
echo "files successfully moved"
i want to count the number of characters that are been displayed. i am doin it using
echo "files... (8 Replies)
Discussion started by: Little
8 Replies
9. Shell Programming and Scripting
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Discussion started by: aadityapatel198
6 Replies
10. Shell Programming and Scripting
I am revisiting the problem of sentence splitting. I have a Perl Script which splits a para into sentences, but acronyms and short forms create an issue
#!/usr/bin/perl
use feature qw/say/;
use strict;
use warnings;
my $s;
my @arr;
while(<>) {
chomp $_;
$s .= $_ . " ";
}
@arr... (2 Replies)
Discussion started by: gimley
2 Replies
LEARN ABOUT PHP
fann_init_weights
FANN_INIT_WEIGHTS(3) 1 FANN_INIT_WEIGHTS(3)
fann_init_weights - Initialize the weights using Widrow + Nguyen's algorithm
SYNOPSIS
bool fann_init_weights (resource $ann, resource $train_data)
DESCRIPTION
Initialize the weights using Widrow + Nguyen's algorithm.
This function behaves similarly to fann_randomize_weights(3). It will use the algorithm developed by Derrick Nguyen and Bernard Widrow to
set the weights in such a way as to speed up training. This technique is not always successful, and in some cases can be less efficient
than a purely random initialization.
The algorithm requires access to the range of the input data (for example largest and smallest input), and therefore accepts a second
argument, data, which is the training data that will be used to train the network.
PARAMETERS
o $ann
-Neural network resource.
o $train_data
-Neural network training data resource.
RETURN VALUES
Returns TRUE on success, or FALSE otherwise.
SEE ALSO
fann_randomize_weights(3), fann_read_train_from_file(3).
PHP Documentation Group FANN_INIT_WEIGHTS(3)