03-28-2011
@Bartus
LOL , you geek
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Does anyone know how to insert text at the top and bottom of a file using sed? (12 Replies)
Discussion started by: MBGPS
12 Replies
2. Shell Programming and Scripting
I need to insert a file called temp_impact (which has about 15 lines in it) to a file called 11.23cfg starting at line 33. I searched the forums and found the
sed '34i\
test' 11.23cfg > newfile
That will enter word test at the appropriate line, but i need the entire file dumped there. Any... (4 Replies)
Discussion started by: insania
4 Replies
3. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies
4. Shell Programming and Scripting
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies
5. Shell Programming and Scripting
I know that
sed -n '12p' file
will print line 12 but how might I insert text to a specified line?
thanks (2 Replies)
Discussion started by: action_owl
2 Replies
6. Shell Programming and Scripting
Hello,
I'm new in Shell scripting but i should write a script, which inserts the license header out of a txt-File into the files in our Projekt. For the Java classes it runs without Problems but for XML files not. At xml-files i have to put the license Header after the xml-Header (?xml... (1 Reply)
Discussion started by: PhoenixONE
1 Replies
7. Shell Programming and Scripting
I can't seem to get sed to allow me to insert text in the first line of an empty file. I have a file.txt that is a 0 byte file. I want sed to insert " fooBar" onto the first line. I've tried a few options and nothing seems to work. They work just fine if there's text in the file tho. Help? (4 Replies)
Discussion started by: DC Slick
4 Replies
8. UNIX for Dummies Questions & Answers
I want to insert a line with text after the 9th line of a text file. How would I do this using sed or awk? (2 Replies)
Discussion started by: lost.identity
2 Replies
9. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
PPI(4) BSD Kernel Interfaces Manual PPI(4)
NAME
ppi -- user-space interface to ppbus parallel 'geek' port
SYNOPSIS
device ppi
Minor numbering: unit numbers correspond directly to ppbus numbers.
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>
DESCRIPTION
The ppi driver provides a convenient means for user applications to manipulate the state of the parallel port, enabling easy low-speed I/O
operations without the security problems inherent with the use of the /dev/io interface.
PROGRAMMING INTERFACE
All I/O on the ppi interface is performed using ioctl() calls. Each command takes a single u_int8_t argument, transferring one byte of data.
The following commands are available:
PPIGDATA, PPISDATA
Get and set the contents of the data register.
PPIGSTATUS, PPISSTATUS
Get and set the contents of the status register.
PPIGCTRL, PPISCTRL
Get and set the contents of the control register. The following defines correspond to bits in this register. Setting a bit in the
control register drives the corresponding output low.
STROBE
AUTOFEED
nINIT
SELECTIN
PCD
PPIGEPP, PPISEPP
Get and set the contents of the EPP control register.
PPIGECR, PPISECR
Get and set the contents of the ECP control register.
PPIGFIFO, PPISFIFO
Read and write the ECP FIFO (8-bit operations only).
EXAMPLES
To present the value 0x5a to the data port, drive STROBE low and then high again, the following code fragment can be used:
int fd;
u_int8_t val;
val = 0x5a;
ioctl(fd, PPISDATA, &val);
ioctl(fd, PPIGCTRL, &val);
val |= STROBE;
ioctl(fd, PPISCTRL, &val);
val &= ~STROBE;
ioctl(fd, PPISCTRL, &val);
BUGS
The inverse sense of signals is confusing.
The ioctl() interface is slow, and there is no way (yet) to chain multiple operations together.
The headers required for user applications are not installed as part of the standard system.
BSD
January 2, 1998 BSD