Newby here.....
Is there any way of doing a find & replace within a huge file other than using something like : " vi - FileForReplacing < /u1/excel/consultants "
contents of consultants file looks like
:1,$s/0000031/CON/g
:1,$s/0001032/JONES/g
:1,$s/0001355/SMITH/g... (3 Replies)
I have some ASCII files containing numerous numbers. What I'd like to do is replace all numbers greater than 0 with 1.
Examples of the numbers include: - 000011 and 000042
Thanks (4 Replies)
Hi
Im trying to replace http port value.However for some reason its not working.Can you guys take a look and hit me with suggestions please.Your help is much appreciated.
echo "Enter Value"
read ans
sed -i "s/http-port = 80 /http-port = $ans/g" demo
Note:demo is the filename
... (6 Replies)
Hi,
I have lines in some files that look exactly as below, and the line numbers they occur in are always the same. (Lines 136-139)
W 0.00000000 0.00000000 2.00000000
W 0.50000000 0.50000000 2.50000000
W 0.00000000 0.00000000 3.00000000
W 0.50000000 0.50000000 3.50000000
I'd like to... (0 Replies)
Hi,
I would like to do a scripting for finding the links based on the name I have and replace the links with the new name. General find command lists everything for that links ( means all the sub-sirs and all the files), i need only the main link and replace.
Can you anyone give me some... (1 Reply)
hi i have two files
one of the form
1 2
2 45
3 56
4 98
5 6598
6 98
7 10
8 0
9 15
10 56
This file's significance is that it maps the number in first column to that of the number in second column
The other file is of the form
1
2 (1 Reply)
Hi Guys,
I saw this line of code in a script
sftp username@hostname#2200
get file
and the script never asked for password. Can you please explain on this?:confused: (9 Replies)
Hi, I need to replace a character between two numbers (specifically a - to a _). The problem is that they can be *any* numbers. So, I need a one liner to turn a file like this:
1-2
3-4
55-66
4323-12312893
into the following
1_2
3_4
55_66
4323_12312893
Any help would be appreciated! (5 Replies)
Discussion started by: mikey11415
5 Replies
LEARN ABOUT DEBIAN
ieee1284_read_status
IEEE1284_STATUS(3) Functions IEEE1284_STATUS(3)NAME
ieee1284_read_status, ieee1284_wait_status - analyse status lines
SYNOPSIS
#include <ieee1284.h>
int ieee1284_read_status(struct parport *port);
int ieee1284_wait_status(struct parport *port, unsigned char mask, unsigned char val, struct timeval *timeout);
DESCRIPTION
There are five status lines, one of which is usually inverted on PC-style ports. Where they differ, libieee1284 operates on the IEEE 1284
values, not the PC-style inverted values. The status lines are represented by the following enumeration:
enum ieee1284_status_bits
{
S1284_NFAULT = 0x08,
S1284_SELECT = 0x10,
S1284_PERROR = 0x20,
S1284_NACK = 0x40,
S1284_BUSY = 0x80,
/* To convert those values into PC-style register values, use this: */
S1284_INVERTED = S1284_BUSY,
};
These functions all act on the parallel port associated with port, which must be claimed.
The purpose of ieee1284_wait_status is to wait until particular status lines have specified values. Its timeout parameter may be modified
on return.
RETURN VALUE
For ieee1284_read_status, the return value is a non-negative integer with bits set as appropriate representing the status lines. A negative
result indicates an error.
For ieee1284_wait_status, the return value is E1284_OK if the status lines now reflect the desired values (i.e. status & mask is val), or a
negative result indicating an error.
Possible error codes:
E1284_NOTIMPL
The port lacks the required capability. This could be due to a limitation of this version of libieee1284, or a hardware limitation.
E1284_NOTAVAIL
Access to the status lines is not available on this port type.
E1284_TIMEDOUT
The timeout has elapsed.
E1284_INVALIDPORT
The port parameter is invalid (for instance, perhaps the port is not claimed).
NOTES
The nAck pin is often able to trigger interrupts on the host machine. With operating system help these interrupts may be visible to the
application via the file descriptor returned by ieee1284_get_irq_fd.
Under Linux, the conditions are that the parallel port driver knows which interrupt line to use and is using it, and that the relevant
/dev/parport device node is accessible and backed by a device driver.
AUTHOR
Tim Waugh <twaugh@redhat.com>
Author.
COPYRIGHT
Copyright (C) 2001-2003 Tim Waugh
09/18/2007 IEEE1284_STATUS(3)