Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I find where line 468 is? Post 12407 by primal on Friday 28th of December 2001 10:44:26 PM
Old 12-28-2001
you can also do (in VI's command mode)

:468

VI does not use capital G (dunno about the other editors though)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find previous line, next line on solaris

Hi, Unlike the GNU version, grep on SunOS doesn't have the switches -B and -A to fetch me the lines before n after the match and looking for an alternate way. Any Suggestions?. -Anduzzi (1 Reply)
Discussion started by: anduzzi
1 Replies

2. Shell Programming and Scripting

Find the line/line of a script that is exceuted

Hello all, how can i get the line/line number from a script that is being executed. Its not running in a verbose mode. Unable to get them using ps command. Anyone to help on this. Thnx Sri (3 Replies)
Discussion started by: srivat79
3 Replies

3. UNIX for Dummies Questions & Answers

Find Pattern delete line and next line

I am trying to delete the line with pattern and the next line. Found the below command in forum which also deleted the previous line. how should i modify that to make sure that only the line with pattern and the next line are deleted but not the previous line? awk '/key... (1 Reply)
Discussion started by: rdhanek
1 Replies

4. Shell Programming and Scripting

Find specific line and delete line after.

I'm looking for a way to search a file, in this case init.rc for a specific match, service adbd /sbin/adbd, and delete the a specific line after it Original: # adbd is controlled by the persist.service.adb.enable system property service adbd /sbin/adbd disabled After deletion: #... (5 Replies)
Discussion started by: GabrialDestruir
5 Replies

5. Shell Programming and Scripting

Find a line using a condition and replace a string in that line

Hello, I have a 100 line code. I have given a sample of it below: ABC*654654*1*54.54*21.2*87*1*654654654654 CCC*FS*FS*SFD*DSF GGG*FGH*CGB*FBDFG*FGDG ABC*654654*1*57.84*45.4*88*2*6546546545 CCC*WSF*SG*FGH*GHJ ADA*AF*SFG*DFGH*FGH*FGTH I need to select the line starting with "ABC" its... (6 Replies)
Discussion started by: nithins007
6 Replies

6. Emergency UNIX and Linux Support

Find a line using a condition and replace a string in that line

Hello, I have a 100 line code. I have given a sample of it below: ABC*654654*1*54.54*21.2*87*1*654654654654 CCC*FS*FS*SFD*DSF GGG*FGH*CGB*FBDFG*FGDG ABC*654654*1*57.84*45.4*88*2*6546546545 CCC*WSF*SG*FGH*GHJ ADA*AF*SFG*DFGH*FGH*FGTH I need to select the line starting with "ABC" its... (3 Replies)
Discussion started by: nithins007
3 Replies

7. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

8. UNIX for Advanced & Expert Users

How to find a string in a line in UNIX file and delete that line and previous 3 lines ?

Hi , i have a file with data as below.This is same file. But actual file contains to many rows. i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ? Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies

9. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

10. Shell Programming and Scripting

Find line then evaluate text on next line, print when condition is met

Hello, I am looking for a specific situation in a text file. The conditions are, > <CompoundName> InChI=1S/C5H12NO2/c1-5(2)4-8-6(3)7/h5H,4H2,1-3H3/q+1 I am looking for cases where the line "> <CompoundName>" is followed by a line that contains the string "InChI=" without regard to... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
GEOM_MAP(4)						   BSD Kernel Interfaces Manual 					       GEOM_MAP(4)

NAME
geom_map -- GEOM module that maps defined items as separate partitions SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device geom_map DESCRIPTION
The geom_map framework provides support for mapping defined parts of the media. Basically it is helpful for embedded devices where in the one continuous flash are loader, kernel and rootfs parts. geom_map allows making them available as separate parts and protects the loader from being overwritten. At boot time geom_map partitions are listed (only with bootverbose) as: MAP: 0x30000, data=0x30000 "/dev/map/bootloader" MAP: 30000x10000, data=0x10000 "/dev/map/factory" MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade" MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 MAP: 40000x110000, data=0x110000 "/dev/map/kernel" MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" MAP: 7e0000x20000, data=0x20000 "/dev/map/config" The current geom_map configuration can be accessed with the following sysctl(8) nodes: kern.geom.conftxt, kern.geom.confxml, and kern.geom.confdot or by using ``geom map list''. # sysctl -n kern.geom.conftxt 0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc 0 DISK cfid0 8388608 4 hd 0 sc 0 1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072 1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280 2 UNCOMPRESS map/rootfs.uncompress 18677760 512 1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112 1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392 1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536 1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608 Driver configuration can be done in device.hints(5). List of used parameters: at select media to attach name name of partition (will create device /dev/map/that_name) start offset from the beginning of the parent media to start of the mapped partition. This field can also have a special value "search:searchstart:searchstep:searchkey", where: searchstart offset from the beginning of the parent media where search will be started searchstep value of the increment used while searching for the partition boundary markers searchkey key which will be used to find partition boundary markers. The wildcard '.' can be used to match any character on that posi- tion end offset from the beginning of the parent media to the end of the mapped partition. This field can also have the special value "search:searchstart:searchstep:searchkey", as described above. offset offset where the data of the mapped partition begins Each record contains the start address (in bytes) from the media begin, size (in bytes), offset where the data of mapped partition begins, and the name of new device. MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" 00150000 - start address 00690000 - size 00000000 - data begin from zero offset 00690000 - data size "map/rootfs" - new media will be accessible via /dev/map/rootfs dev. EXAMPLES
If we need to implement layout shown above, we need to define the following hints: hint.map.0.at="cfid0" hint.map.0.start=0x00000000 hint.map.0.end=0x00030000 hint.map.0.name="bootloader" hint.map.0.readonly=1 This defines /dev/map/bootloader at disk cfid0 starting at 0x00000000 and ending at 0x00030000, it is also marked as readonly. hint.map.1.at="cfid0" hint.map.1.start=0x00030000 hint.map.1.end=0x00040000 hint.map.1.name="factory" hint.map.2.at="cfid0" hint.map.2.start=0x00040000 hint.map.2.end=0x007e0000 hint.map.2.name="upgrade" hint.map.3.at="cfid0" hint.map.3.name="kernel" hint.map.3.start=0x00040000 hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh" This defines /dev/map/kernel at disk cfid0 starting at 0x00040000, but the end position must be searched by finding the key ``.!/bin/sh'', from offset 0x00100000 to the end of media with step 0x10000. The real marker in this case is ``#!/bin/sh'', but '#' terminates the line when the hints file is parsed, so we need to use wildcard '.' instead of '#'. hint.map.4.at="cfid0" hint.map.4.name="rootfs" hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh" hint.map.4.end=0x007e0000 hint.map.5.at="cfid0" hint.map.5.start=0x007e0000 hint.map.5.end=0x00800000 hint.map.5.name="config" SEE ALSO
geom(4), geom(8), sysctl(8) AUTHORS
The geom_map driver was written by Aleksandr Rybalko <ray@ddteam.net>. BSD
May 17, 2011 BSD
All times are GMT -4. The time now is 04:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy