I need a quick script that will serve as a sort of "real time monitor" for watching some log files. I am using Bourne shell in HP-UX 10.20. I have basically created a script that never ends, unless of course I manually terminate it. Here's the script (it's called qhistory):
clear
echo "REAL... (3 Replies)
Hi,
I'm pretty new to UNIX shell scripting and need some help. We have an Informatica interface that dumps any files that have errors into a directory. I need to check that directory periodically for any of up to 9 files that might be in it and run a specific process for each file found. The... (3 Replies)
Hi ALL,
I need to take some command line arguments for my script and then want to run a function for each argument.I thought of using for loop as below, but its not working , can some one please help...
#!/bin/ksh
lpar1=$1
lpar2=$2
lpar3=$3
lpar4=$4
lpar5=$5
echo "$lpar1" >>lpar.txt
echo... (4 Replies)
I have about 5000 columns of data that i need to convert all of it into pecentages. for shorter colums i have been using this code:
{print $1/($1+$2)*100,$2/($1+$2),$3/($3+$4)*100 .....}
but this is a teadious process... is there anyway to do it without having to write all of them out?
sample... (20 Replies)
Hi,
PHP user here. I'm using an endless loop to perform to mimic a cron. The script does something every 20 minutes. It sleep()s in the meantime.
I have various checks that ensure that only instance can run, including a "gentleman agreement" locked file.
However, I'd like to make sure... (2 Replies)
Hi,
I want to write a while loop like this can any one say me whats wrong with my loop
USAGE="Usage: Mail.ksh"
integer i=3
while ((1<i<=3))
do
.
.
.
.
(( CMD_JUL = LSD_JUL - i ))
CUR_MAINT_DATE=$(julian2date ${CMD_JUL})
.
.
.
i=i-1
done (1 Reply)
When finding a string in files within a directory, one can use this:
grep -r "searchstring" dir/subdir/ > listofoccurrences.txt
For brevity sake one can enter the intended directory and use this:
grep -r "searchstring" . > listofoccurrences.txt
which as I found out leads to an endless loop,... (2 Replies)
Hi All,
I've written a script to read 2 files and compare the contents using while loop but somehow when $line is not found in test2, the script will continue looping.
Below is my code, pls advise what could went wrong
TIA
Nick
for line in test1.txt | while read line
do
grep -i... (4 Replies)
Hi,
AM very new to shell scripting and try to run a simple do while loop statement, but it ends up running endlessly. please can anyone assist, dunno what am doing wrong, any useful suggestions will be welcomed.
#!/bin/ksh
### To check a running process instance
#################... (5 Replies)
I was practicing writing simple loops as I am a new bash user and I created this script, which turned out to be an endless loop where the echo output does not stop and I do not see where my mistake is.
#!/bin/bash
echo 'enter a number from 1 to 100'
read number
while
do
... (2 Replies)
Discussion started by: goldenlinx
2 Replies
LEARN ABOUT DEBIAN
marc
MARC(1) LOCAL COMMANDS MARC(1)NAME
marc - archive merger
SYNOPSIS
marc tgtarc srcarc [ files ... ]
DESCRIPTION
Reads files from the arc archive srcarc and add them to the arc archive tgtarc.
HISTORY
Arc has been in use in the CP/M and MSDOS world for many years. Thom Henderson developed the original version, but it is important to note
that arc is based on the file compression theories developed by Huffman, Welch, Knott, Knuth, and many other scientists. This implementa-
tion is based on version 5.21 of the MSDOS program.
BUGS
Arc behaves just like the PC version of the program; all functions of the "usage" display are working. Full compatibility with PC ARC
files is maintained, the price for which is that arc doesn't like long filenames, and can only archive files with names of up to 12 charac-
ters. It will *sometimes* do The Right Thing with them, but I suggest you put long-winded filenames in a "shar" before arcing them.
There shouldn't be any problems, (hah!) but if you find any, please send them to me at:
hyc@hanauma.jpl.nasa.gov
AUTHORS
Original MSDOS program by Thom Henderson
COPYRIGHT(C) 1985-87 by System Enhancement Associates; ALL RIGHTS RESERVED
Original Lempel-Zev code derived from compress 4.0. Modified to support Squashing by Dan Lanciani (ddl@harvard.edu) Ported from MSDOS by
Howard Chu, with help from John Gilmore (hoptoad!gnu), James Turner (daisy!turner) and others.
Howard Chu@JPL 25 Nov 1992 MARC(1)