04-13-2006
change only selected line
hi
i dont know how to go abt this? as i m new to unix.
i have file say as xct. in file there are so many commands.
[ frankly its crontab file]. now here i m accepting new cron settings from user.
but these new settings will be applicable for particular command.
like my file is as
* * * * * read a < /aaadatamart/training/swapneel/util/cronsettings && [ $a -eq 1 ] && ksh /aaadatamart/training/swapneel/util
/hi
* * * * * read a < /aaadatamart/training/swapneel/util/cronsettings && [ $a -eq 2 ] && ksh /aaadatamart/training/swapneel/util
/hi1
* * * * * read a < /aaadatamart/training/swapneel/util/cronsettings && [ $a -eq 3 ] && ksh /aaadatamart/training/swapneel/util
/hi2
Now here first i will ask user choice -- [ say hi2]
then i will ask user abt new minute,date,... cron settings.
then those settings i want to add to this line so my crontab file with the new settings as per the user new input for selected choice [hi2]
plz guide me how go abt this. any logic or atleast any clue?
thanks in advance
regards,
swapneel
here i know how to edit cron file.
crontab < filename.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-These character positions are fixed througout the file
-----------------------
e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
4 Replies
2. Shell Programming and Scripting
Hello Experts,
I am working on a small file editing script. Since all experts here are very generous to give me the complete code, I would take up the problem in steps so that I ensure my opportunity to learn.
AIM: The script has some commented and some uncommented lines. I need to :
... (2 Replies)
Discussion started by: hkansal
2 Replies
3. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
4. Shell Programming and Scripting
Hello,
I want to change a line at file whit a script
i want to change line 150 for example, write hello and remove text of this line
EXAMPLE
LINE 150: my mother
change to:
LiNE 150: HELLO (4 Replies)
Discussion started by: uri_crack
4 Replies
5. Shell Programming and Scripting
I want to delete a line between selected lines using sed:
e.g. : Between "bus" to "pins", delete lines conaining "signal" word.
Input :
bus
direction
signal new
signal old
pins
signal ok
end
Desired Output:
bus
direction
pins
signal
end (4 Replies)
Discussion started by: nehashine
4 Replies
6. Shell Programming and Scripting
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
FILE 1:
ABS 456 315
EBS 923 163
JYQ3 654 237
FILE 2:... (1 Reply)
Discussion started by: engr.jay
1 Replies
7. UNIX Desktop Questions & Answers
i have a line that has ",,", i need to change it to "," ; But i have it more than one time in the same line , sub(",,",",",$0) just sub the first one in the line?
---------- Post updated at 08:15 AM ---------- Previous update was at 08:15 AM ----------
using AWK please (2 Replies)
Discussion started by: Reham.Donia
2 Replies
8. Shell Programming and Scripting
How do you get the contents of a line directly after a selected one? Also, how about before it? I am using CSH and don't have any GNU products installed.
Input file:
apple
orange
plum
So say I use grep on orange...how do I get plum (this line can be different so I can't just grep... (4 Replies)
Discussion started by: thibodc
4 Replies
9. Shell Programming and Scripting
if ! grep -q "aa" $line;then
if ! grep -q "bb" $line;then
somthing
fi
fi (2 Replies)
Discussion started by: yanglei_fage
2 Replies
10. Shell Programming and Scripting
Ultimate goal is to delete lines from before and after a block of lines in a given file. First attempt was something like this:
sed -e '1,/STARTUP/ d' inputfile.txt > outputfile.txt
but that deleted everything down to and including the line with STARTUP. I need to delete everything before... (6 Replies)
Discussion started by: edstevens
6 Replies
LEARN ABOUT PHP
fann_cascadetrain_on_data
FANN_CASCADETRAIN_ON_DATA(3) 1 FANN_CASCADETRAIN_ON_DATA(3)
fann_cascadetrain_on_data - Trains on an entire dataset, for a period of time using the Cascade2 training algorithm
SYNOPSIS
bool fann_cascadetrain_on_data (resource $ann, resource $data, int $max_neurons, int $neurons_between_reports, float $desired_error)
DESCRIPTION
The cascade output change fraction is a number between 0 and 1 determining how large a fraction the fann_get_MSE(3) value should change
within fann_get_cascade_output_stagnation_epochs(3) during training of the output connections, in order for the training not to stagnate.
If the training stagnates, the training of the output connections will be ended and new candidates will be prepared.
This training uses the parameters set using the fann_set_cascade_..., but it also uses another training algorithm as it's internal train-
ing algorithm. This algorithm can be set to either FANN_TRAIN_RPROP or FANN_TRAIN_QUICKPROP by fann_set_training_algorithm(3), and the
parameters set for these training algorithms will also affect the cascade training.
PARAMETERS
o $ann
-Neural network resource.
o $data
-Neural network training data resource.
o $max_neurons
- The maximum number of neurons to be added to neural network.
o $neurons_between_reports
- The number of neurons between printing a status report. A value of zero means no reports should be printed.
o $desired_error
- The desired fann_get_MSE(3) or fann_get_bit_fail(3), depending on which stop function is chosen by fann_set_train_stop_func-
tion(3)
RETURN VALUES
Returns TRUE on success, or FALSE otherwise.
SEE ALSO
fann_train_on_data(3), fann_cascadetrain_on_file(3).
PHP Documentation Group FANN_CASCADETRAIN_ON_DATA(3)