10-24-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use sed to delete multiple lines in a file. The problem is that I need to search for a certain line and then once found delete it plus the next 4 lines. For instance if I had a file that consisted of the following lines:
#Data1.start
(
(Database= data1)
(Name = IPC)... (1 Reply)
Discussion started by: rambo15
1 Replies
2. Shell Programming and Scripting
Hi,
I need convert a dump file in the following format : (please note that line numbers are provided for easy look)
Original file:
1 2007-10-2482.90 No trade 0 0.00 100000.00
2 100000.00
3 0.00
4 HOLD
5 2007-10-2589.75 Bought 1114 1114 100000.00 0.00
... (5 Replies)
Discussion started by: sabyasm
5 Replies
3. Shell Programming and Scripting
I have seen there are many sed posts but still it is quite difficult to apply other post to my own problem
How can I delete all lines in a file from 2 lines after this pattern
*End_fine_coreg:_NORMAL
to the end of file?
Cheers (2 Replies)
Discussion started by: larne
2 Replies
4. Shell Programming and Scripting
Hi All,
Please can anyone help me as am deleting a line in a file with the below script:
sed '/"$value"/d' redirects.virgin-atlantic.com.conf > olist
where $value is a variable where the pattern to be matched is stored.
I am not getting any error also but the line containing the pattern... (2 Replies)
Discussion started by: Shazin
2 Replies
5. Shell Programming and Scripting
As an example (just an example, this could apply to any block of text) say I have this:
architecture x86_64
cputype CPU_TYPE_X86_64
cpusubtype CPU_SUBTYPE_X86_64_ALL
offset 4096
size 2972420
align 2^12 (4096)
architecture ppc64
cputype CPU_TYPE_POWERPC64
cpusubtype... (3 Replies)
Discussion started by: pcwiz
3 Replies
6. Shell Programming and Scripting
Title says all :p
Thanks for your help (4 Replies)
Discussion started by: drbiloukos
4 Replies
7. Shell Programming and Scripting
hi,
Here is excerpt from my xml file
<!-- The custom module to do the authentication for LDAP
-->
</login-module>
<login-module code="com.nlayers.seneca.security.LdapLogin" flag="sufficient">
<module-option... (1 Reply)
Discussion started by: sunrexstar
1 Replies
8. UNIX for Dummies Questions & Answers
HI,
My input file contains below data:
DFHDR
12345110
1,200
2,-100
1,100
2,123
12345110
1,300
2,200
DFTLR
In the above data, the first line and last lines should be remove as well as the lines in which contains 110 as position(6,7,8 position) should also be removed,
How we... (0 Replies)
Discussion started by: pandeesh
0 Replies
9. Shell Programming and Scripting
I am downloading numerous files (600 plus) using a 'wget' script. Some files are not downloading and have zero byte size. I am using the following 'find' command to find the files in my cd which have non-zero byte size after the wget script has been run.
find -type f -size +0 -exec basename {}... (3 Replies)
Discussion started by: dl226
3 Replies
10. UNIX for Dummies Questions & Answers
Hi Anybody can help me to delete the last 3 lines from a text file via sed under SunOS 5.8?
Thanks
Aldar (4 Replies)
Discussion started by: aldar
4 Replies
LEARN ABOUT SUNOS
mlib_imagetestflags
mlib_ImageTestFlags(3MLIB) mediaLib Library Functions mlib_ImageTestFlags(3MLIB)
NAME
mlib_ImageTestFlags - test flags
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
int mlib_ImageTestFlags(const mlib_image *img, mlib_s32 flags);
DESCRIPTION
The mlib_ImageTestFlags() function tests the flags for a combination of the following predefined characteristics. Note that the result of
zero means the conditions are satisfied.
MLIB_IMAGE_ALIGNED64 /* data address is 64-byte aligned */
MLIB_IMAGE_ALIGNED8 /* data address is 8-byte aligned */
MLIB_IMAGE_ALIGNED4 /* data address is 4-byte aligned */
MLIB_IMAGE_ALIGNED2 /* data address is 2-byte aligned */
MLIB_IMAGE_WIDTH8X /* width is multiple of 8 */
MLIB_IMAGE_WIDTH4X /* width is multiple of 4 */
MLIB_IMAGE_WIDTH2X /* width is multiple of 2 */
MLIB_IMAGE_HEIGHT8X /* height is multiple of 8 */
MLIB_IMAGE_HEIGHT4X /* height is multiple of 4 */
MLIB_IMAGE_HEIGHT2X /* height is multiple of 2 */
MLIB_IMAGE_STRIDE8X /* stride is multiple of 8 */
MLIB_IMAGE_ONEVECTOR /* stride is equal to width in bytes */
MLIB_IMAGE_USERALLOCATED /* data space has been allocated by user */
MLIB_IMAGE_ATTRIBUTESET /* image attribute flags have been set */
PARAMETERS
The function takes the following arguments:
img Pointer to a mediaLib image structure.
flags Combination of a set of characteristics to be tested. It is formed by logically Oring one or more individual predefined
characteristics.
RETURN VALUES
The function returns an integer value containing results of test. Condition = 0 if satisfied; otherwise, Condition != 0.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
mlib_ImageGetFlags(3MLIB), attributes(5)
SunOS 5.10 10 Nov 2004 mlib_ImageTestFlags(3MLIB)