I have a file TXTPROCESS.TXT.20071129 in which line 1 contains the file name and rest of the records are data.
The file data looks like this:
TXTPROCESS.TXT.20071129
DIVD20071129
INTR20071129
BALN20071129
From line 2 onwards the first 4 characters defines individual process. What I... (2 Replies)
Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
Hiii
I am very new to shell scripting.This is my data file
a.txt:
56
45.78
1000
11.23
76.89
45
34.56
23
3400
100
..........
Now i am must use shell scripting to read n number of lines from the file & from ts n number of lines i need to find greatest number among them & so on for... (44 Replies)
Hello, I'm trying to create a BASH file that can read all the files in my working directory and tell me how many words and lines are in that file. I wrote the following code:
FILES="*"
for f in "$FILES"
do
echo -e `wc -l -w $f`
done
My issue is that my file is outputting in one... (4 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
I have a set of log files that are in the following format
======= set_1 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_2 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_3 ========
counter : 315
counter2: 204597
counter3: 290582
Is... (6 Replies)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
LEARN ABOUT V7
vp
VP(4) Kernel Interfaces Manual VP(4)NAME
vp - Versatec printer-plotter
DESCRIPTION
Vp0 is the interface to a Versatec D1200A printer-plotter with a Versatec C-PDP11(DMA) controller. Ordinarily bytes written on it are
interpreted as ASCII characters and printed. As a printer, it writes 64 lines of 132 characters each on 11 by 8.5 inch paper. Only some
of the ASCII control characters are interpreted.
NL performs the usual new-line function, i.e. spaces up the paper and resets to the left margin. It is ignored however following a CR
which ends a non-empty line.
CR is ignored if the current line is empty but is otherwise like NL.
FF resets to the left margin and then to the top of the next page.
EOT resets to the left margin, advances 8 inches, and then performs a FF.
The ioctl(2) system call may be used to change the mode of the device. Only the first word of the 3-word argument structure is used. The
bits mean:
0400 Enter simultaneous print/plot mode.
0200 Enter plot mode.
0100 Enter print mode (default on open).
040 Send remote terminate.
020 Send remote form-feed.
010 Send remote EOT.
04 Send remote clear.
02 Send remote reset.
On open a reset, clear, and form-feed are performed automatically. Notice that the mode bits are not encoded, so that it is required that
exactly one be set.
In plot mode each byte is interpreted as 8 bits of which the high-order is plotted to the left; a `1' leaves a visible dot. A full line of
dots is produced by 264 bytes; lines are terminated only by count or by a remote terminate function. There are 200 dots per inch both ver-
tically and horizontally.
When simultaneous print-plot mode is entered exactly one line of characters, terminated by NL, CR, or the remote terminate function, should
be written. Then the device enters plot mode and at least 20 lines of plotting bytes should be sent. As the line of characters (which is
20 dots high) is printed, the plotting bytes overlay the characters. Notice that it is impossible to print characters on baselines that
differ by fewer than 20 dot-lines.
In print mode lines may be terminated either with an appropriate ASCII character or by using the remote terminate function.
FILES
/dev/vp0
SEE ALSO opr(1)VP(4)