04-08-2009
Only and idea: Each time, write to a file the last linenumber processed.
Next time read that number into a variable and begin processing at that line plus 1.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
How can I attach a file using sendmail?
I tried /A option like this:
$ /usr/bin/sendmail toaddress@gmail.com /A afile.txt
but doesn't seem to work.
- Monkfan (2 Replies)
Discussion started by: monkfan
2 Replies
2. Shell Programming and Scripting
Hello ,
Well I have some /tmp files which are growing very quickly..Can anyone suggest me a way to find which process is logging into this file :confused: ?
Thanks very much in Advance!!
Mohammed (2 Replies)
Discussion started by: Mohammed
2 Replies
3. Shell Programming and Scripting
Hi folks,
How do we create a file using shell script?
i mean to say that do we use
is it a good approch to do
echo "abc" >file
echo "xxxx" >>file
or is there any better method?
Thanks,
Amit (5 Replies)
Discussion started by: amit4g
5 Replies
4. Shell Programming and Scripting
If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process?
p1 >> test.log &;
p2 >> test.log &;
p3 >> test.log &
Thanks, (5 Replies)
Discussion started by: casttree
5 Replies
5. Shell Programming and Scripting
Input:
hiddenhausen 99.60 y 1.05 2.50 -550 -110 1:25:200
herbstein 99.021 n 1.05 2.50 -550 -110 1:25:200
bangalore 98.82 y 1.05 2.50 -550 -110 1:25:200
golm 98.8 y 1.05 2.50 -550 -110 1:25:200
para 98.82 n 1.05 2.50 -550 -110 1:25:200
bogen 98.61 n 1.05 2.50 -550 -110 1:25:200
saintandre... (5 Replies)
Discussion started by: asavaliya
5 Replies
6. Shell Programming and Scripting
i have this code num=1
dat10=`date "+%m/%d/%Y" -d "+10 days"`
dat=`date "+%m/%d/%Y"`
set -x
grep "text=.&" /root/Softwares/apache-tomcat-5.5.30/logs/catalina.out|awk -F"from=" '{print $2}'|awk -F"opid" '{print $1}'|sort|uniq > pnos
while read line
do
psql -U poss -d emsver -c "insert into... (3 Replies)
Discussion started by: nikhil jain
3 Replies
7. Shell Programming and Scripting
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies
8. Shell Programming and Scripting
Hello Team-
we would like to implement an approach which has to write the log file simultaneously
when .sql file is executing by Unix process. At present,it is writing the log file
once the process is completed. I've tested the current process with the below
approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies
9. Shell Programming and Scripting
I'm working on a bash script to finish uploading a file.
I need a way to get $filesize so that "restart $filesize" will work.
Here is my script:
ftp -n -v <<END_SCRIPT
open ftp.$domain
user $user@$domain $password
size $file
restart $filesize
put $file
quit
END_SCRIPTWayne Sallee... (9 Replies)
Discussion started by: WayneSallee
9 Replies
10. Shell Programming and Scripting
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies
RP(4) Kernel Interfaces Manual RP(4)
NAME
rp - RP-11/RP03 moving-head disk
DESCRIPTION
The files rp0 ... rp7 refer to sections of RP disk drive 0. The files rp8 ... rp15 refer to drive 1 etc. This allows a large disk to be
broken up into more manageable pieces.
The origin and size of the pseudo-disks on each drive are as follows:
disk start length
0 0 81000
1 0 5000
2 5000 2000
3 7000 74000
4-7 unassigned
Thus rp0 covers the whole drive, while rp1, rp2, rp3 can serve usefully as a root, swap, and mounted user file system respectively.
The rp files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk
records. There is also a `raw' interface which provides for direct transmission between the disk and the user's read or write buffer. A
single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are
transmitted. The names of the raw RP files begin with rrp and end with a number which selects the same disk section as the corresponding
rp file.
In raw I/O the buffer must begin on a word boundary.
FILES
/dev/rp?, /dev/rrp?
SEE ALSO
hp(4)
BUGS
In raw I/O read and write(2) truncate file offsets to 512-byte block boundaries, and write scribbles on the tail of incomplete blocks.
Thus, in programs that are likely to access raw devices, read, write and lseek(2) should always deal in 512-byte multiples.
RP(4)