Actually if there are n "|"s then NF will be n+1.
So,if you have 192 "|"s then NF=193.
So convert your awk one liner accordingly.
---------- Post updated at 06:19 PM ---------- Previous update was at 05:43 PM ----------
hi,
I have tested just similar to your scenario:
My input file:
In the above data, i want only the lines which has less than 5 "|"symbols and the below ask does that:
Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
i want a shell script program for how many times a word occur in a file.
i need not the line number but i want the counts of the particular word
for eg:-
hai how r u..
i am from andhra pradesh..
i am from tenali.i need this answer.i need it urgently..
i hope u will answer this ...
... (9 Replies)
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Hi,
Please suggest how to write a shell script which delets all the lines containing the word unix in the files supplied as argument in the shell. (4 Replies)
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)
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Hi,
I have a unix file which has many lines, i need to join all the lines to single line.
Eg: myfile.txt contains:
a
123
45fg
try
and i need the output as :
a 123 45fg try
Please help me on this.
Thanks! (2 Replies)
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
LEARN ABOUT PHP
fann_train_on_file
FANN_TRAIN_ON_FILE(3) 1 FANN_TRAIN_ON_FILE(3)fann_train_on_file - Trains on an entire dataset, which is read from file, for a period of timeSYNOPSIS
bool fann_train_on_file (resource $ann, string $filename, int $max_epochs, int $epochs_between_reports, float $desired_error)
DESCRIPTION
Trains on an entire dataset, which is read from file, for a period of time.
This training uses the training algorithm chosen by fann_set_training_algorithm(3) and the parameters set for these training algorithms.
PARAMETERS
o $ann
-Neural network resource.
o $filename
- The file containing train data
o $max_epochs
- The maximum number of epochs the training should continue
o $epochs_between_reports
- The number of epochs between calling a user function. A value of zero means that user function is not called.
o $desired_error
- The desired fann_get_MSE(3) or fann_get_bit_fail(3), depending on the stop function chosen by fann_set_train_stop_function(3)RETURN VALUES
Returns TRUE on success, or FALSE otherwise.
SEE ALSO fann_train_on_data(3), fann_train_epoch(3), fann_get_bit_fail(3), fann_get_MSE(3), fann_set_train_stop_function(3), fann_set_training_algo-
rithm(3), fann_set_callback(3).
PHP Documentation Group FANN_TRAIN_ON_FILE(3)