This script is supposed to find out if tomcat is running or not.
#!/bin/sh
if netstat -a | grep `grep ${1}: /tomcat/bases | awk -F: '{print $3}'` > /dev/null
then
echo Tomcat for $1 running
else
echo Tomcat for $1 NOT running
fi
the /tomcat/bases is a file that... (2 Replies)
Dear Friends,
I have a command which can result following output.
Packet is: /var/adm/yyyy/pkt6043
Intended for network : /vob/repo
I would like to retrive
pkt6043 and /vob/repo using single command.
Blue color test will be always contstant and red color text will be dynamic
... (2 Replies)
Hi,
I would like to know if this is possible, and if so what can i do to make this work.
I would like to grep a line X from fileA and then use the output to replace a word Y in fileB.
grep "line X" fileA | sed -e 's/Y/X/g' > outfile
this statement does not work, as i do not know how to... (7 Replies)
Hi Everyone,
Can anyone please tell me, how can I redirect the grep command output to same file. I am trying with below command but my original file contains no data after executing the command.
$grep pattern file1 > file1
Kind Regards,
Eswar (5 Replies)
How can I grep exactly a string that has .,/ characters using grep?
Example: I want to grep ONLY string1 and not string1.more or string1.more.evenmore
#lsauth ALL|grep 'string1'
All output:
string1 <--- This is the only I want.
string1.more
string1.evenmore.
more.string1... (4 Replies)
Hi there. I have a very large file and I am trying to format it so that I can pull out certain pieces of data/info and report it in spreadsheet format/style.
The file has ###### which will separate each line that will be listed in the spreadsheet. Whenever I find "No" at the end of a line I want... (7 Replies)
Hello,
it would be great if someone can help me with the following:
I want to search for the rows from fileA in column 1 of fileB and output column 2 of fileB if found in fileC. In the moment I search within the complete file. How can I change the code so only column 1 is searched?
cat fileA... (7 Replies)
I have a grep command script which works fine and give the correct results but i wanted the output to be displayed in tabular format ? Is it possible to display
the output in tabular format and as well direct them to some file.
main script :
#!/usr/bin/bash
Start_Time=`date '+%m%d%y... (1 Reply)
Hi Experts,
- Getting error while using it through a variable to get the PID,
PID=42
# UNIX95=1 ps -e -o pcpu,pid,ppid,stime,etime,args | awk '{if ($2~"^42$") print $0}'
0.00 42 0 Feb 10 600-17:21:29 nfs_async_io
- But when using with a variable it is not working .
#... (6 Replies)
Discussion started by: rveri
6 Replies
LEARN ABOUT OSF1
llconvert
llconvert(8) System Manager's Manual llconvert(8)NAME
llconvert - Modify lastlog records from DIGITAL UNIX releases 4.0x and prior to new format
SYNOPSIS
/usr/lbin/llconvert [-vnrp?h] input_file [output_file]
OPTIONS
Restore new format to old format. Verbose. Display lines while converting. Do not preserve contents of input file. Formatted print only.
Do not convert. (May be used with the -r option). Display usage message.
DESCRIPTION
The llconvert command reads records from the lastlog file, such as /var/adm/lastlog, and converts the record format to the updated struct
lastlog format. If no output file is specified or if the output file path is identical to the input file path, llconvert makes a backup
copy of the original input file using the following algorithm: If filename.orig exists. Where n is a unique number.
The llconvert command attempts to detect an input file that is in the wrong format (for example, input file is already a new format file).
A warning message is issued in this case, but conversion continues.
RETURN VALUES
Success. An error occurred.
EXAMPLES
To convert an old format accounting file to the new format: llconvert /var/adm/lastlog.prev
Upon completion of this command, /var/adm/lastlog.prev will have been converted to the new format. The original /var/adm/last-
log.prev is renamed to:
/var/adm/lastlog.prev.orig To convert a lastlog file in new format to the old format: llconvert -r /var/adm/lastlog /var/adm/last-
log.old
FILES
Lastlog header file that defines the format for the lastlog file. The active lastlog file.
SEE ALSO
Commands: finger(1)llconvert(8)