I need a little help in manipulating a file. This is what I need.
I need to move each line barring the top 3 lines, to the right by a 8 (or some specified number ) of places.
Example BEGIN:
I want to move the columns to the right by 8 places, that is,
Example END:
NOTE: HERE * represents an empty or white space.
I have about 30,000 such lines and so moving them to the right manually is not possible. I am wondering if there is a way to quickly do it using sed or something.
Any help would be greatly appreciated.
Thanks
Last edited by methyl; 08-23-2012 at 08:02 PM..
Reason: please use code tags so we can see the spacing in your data
Ignoring @spacebar. Without knowing what Operating System and version you are running or what Bourne-type Shell you use, we can do this in Shell. This will not work for "C Shell".
Please remember to post basic background information about your computer.
To the UUOC idiots. Yes I know that there is a cat in this script. We don't know what Shell this is.
Ps. Thank you for providing sizing information, 30,000 lines is nothing to a modern unix system on modern hardware. We don't need to be efficient.
Last edited by methyl; 08-23-2012 at 08:25 PM..
Reason: syntax oops ; grammar ; Ps
Dear All,
I need to script to change TTL of all zone file in my DNS and aslo i require the serial to be updated to reduce my work load.
Regards
Vicky (0 Replies)
My data is something like shown below.
date1 date2 aaa bbbb ccccc
date3 date4 dddd eeeeeee ffffffffff ggggg hh
I want the output like this
date1date2 aaa eeeeee
I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Dear Friends,
I have a script below mentioned, it is running OK on Linux platform but somehow now i have to use SOLARIS 10 for this script, When i run this script i have some error messages also given below.
Can any of you help me with this, i will be very thankful to him.
... (6 Replies)
Hi,
Iam relatively new to Shell scripting.
............
.........
Cur_log_file=`ls -lrt LOGFILE* | grep 'Jun 30' | tail -1`
...............
..................
Iam trying to find some log file name to check their status, using above script line.
If the log file is not avaible then rest of... (3 Replies)
Hi All,
Please help me in the following query
need a command to get all the files in the present directory except the next day file
format :: abc_<DD>.log
$ls -l
abc_10.log
abc_10.log
abc_11.log
Now i need the output in abc.list which should contains
$more abc.list
abc_10.log... (5 Replies)
hi i am new to c programming and found this on the net could someone tell me what it actually does, many thanks in advance cheers
#include <fcntl.h>
main()
{
int fd;
fd = open("in1", O_RDONLY);
printf("%d\n", fd);
}
and this too please
#include <fcntl.h>
main()
{
int... (1 Reply)
I am new to unix, and have just taken over maintenance/admin of a unix system. I am trying to restore a full backup of one of the consoles on the system. The tape backup device appears to be recognized as it is an option to restore from. After choosing the tape backup and loading the tape, a... (3 Replies)