i have a problem with unix script, till now i just know about how to create header.
i want to change file below
here, my logic is
1. I have input as above
2. I have to know above file is devide into 2 group (begin and end character is same, ex 19407.9 31249.0)
3. I have another input, the value is 651598.50 and 5695659.50
4. I have to add 651598.50 to field 1 and 5695659.50 to field 2
5. I have to give a header (p output_test_tri) and end character (99999) every group.
5. I have to give a main header as below
Cartograpic data in user defined format
....V....1....V....2....V....3....V....4....V....5....V....6....V....7
and ouput should be as below
Cartograpic data in user defined format
....V....1....V....2....V....3....V....4....V....5....V....6....V....7
I have created a script, but this script can not cover my purpose. Kindly need your advice...
Last edited by Scott; 11-13-2012 at 12:41 PM..
Reason: Please use code tags
The output from last script is not devided into 2 groups, I have tried and see the result only has one group. My logic is script have to know the same value/character from input, so if It knows the starting and ending value/character is same, script will add below character into the result to devide it (see the output example, in middle rows, we can find a character as below)
Kindly need your advice,
Thank you very much and regards
Last edited by Scott; 11-14-2012 at 07:22 AM..
Reason: Code tags
Forgive me, I figure I give an uncompleted input, but if I change input as below
And the result should be devided into 3 groups and should add header per group,
"p culture_name" in the every begining group
"99999" after the end of every group
Rdrtx1 has created a good script, just miss grouping. Thanks to him..
Thanks and regards,
Last edited by Scott; 11-14-2012 at 07:23 AM..
Reason: Code tags, please...
Hi everyone , i am new in shell scripting and i want to do a simple job.
A have in a file a text that looks like :
4770 maniac 20 0 13680 312 240 S 0.0 0.0 0:00.00 pro 4770 maniac 20 0 23448 312 240 S 0.0 0.0 0:00.00 pro 4770 maniac 20 0 33216 312 240 S 0.0 0.0 0:00.00 pro
and i want to... (2 Replies)
looking for a script or command to push out from a centralized machine to multiple machines. I have the software in place that will do this already, but I need to tell it what command to run on each machine with this file.
what I need is a script or command to edit a file in a specific manner.... (13 Replies)
Please help!
I have installed 5 Linux OS in the following order:
1st : OpenSUSE 11.0
2nd : Ubuntu 8.4
3rd : Ubuntu 8.10
4th : OpenSUSE 11.1
5th : Fedora 10
Here is the scenario, at the 4th installation i can still choose which OS to boot as what OpenSUSE grub displays. Now, after... (3 Replies)
I created a file system earth in /earthpool (zpool). I mounted the file system on a directory /earth. But, when I reboot my machine it doesn't load the file systems and the zpool and zfs shows no pools available and no datasets respectively. I am using Solaris 10 running on X4500. Could you... (5 Replies)
I have a file oratab with entry like this
SCADAG:/esitst1/oracle/product/9.2.0.8:Y
I am trying to discover a way to change the 9.2.0.8 part of this to something like 10.2.0.4 as part of an upgrade script.
I have tried
cat /etc/oratab >>/tmp/oratab... (1 Reply)
Hallo Friends,
I have written a script which goes through different directories deleting files but I think there is a shorter way I can do this please help.
#!/bin/ksh
#set -x
cd /minotaur/Data/CFD_Input/E_CIF
cd 051
for files in 2008*
do
rm -rf $file
done
#
cd ../052
for... (3 Replies)
Hello Everyone
I am new to this forum.
I am having a requirement to edit the file(the file is having some sql code).
And this file is in my colleagues login. This is readonly
Now I would like to edit this file.
In which way can I do this? (1 Reply)
Hi,
Could anyone give me a idea how to strip the lines from a given file. example
***********
1st occurence
1st occurence
1st occurence
1st occurence
***********
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
*************
3rd occurence
3rd... (10 Replies)
Hello all... I have a Ultra 60 that that is used for connecting a large Xerox printer to the network. This computer takes PDF's and converts them to tiffs and sends them back to a pc :p . In order to transfer data back and forth a mount is manually performed on the UNIX box. The mount of course is... (1 Reply)