I'm a Linux newb, I've been running a Debian Linux server for about a year now, and I've written some simple scripts to automate various things, but I still don't know much, and I forget what I learn as fast as I figure it out... Anyway, that really isn't important, I just want you to know that... (14 Replies)
Hello, I need a smart sed command that can take any of the following two as an input and give below mentioned output. As you can see, I am trying to convert some C code
INPUT:
struct abc_sample1 {
char myString;
UINT16 myValue1;
... (2 Replies)
Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:
sed '1,7w file1; 8,$w file2' fileA
I get only one file named file1 plus all the characters following file1. If I try to use curly... (1 Reply)
Helllo UNIX Forum :)
Since I am posting on this board, yes, I am new to UNIX!
I read a copy of "UNIX made easy" from 1990, which felt like a making a "computer-science time jump" backwards ;)
So, basically I have some sort of understanding what the basic concept is.
Problem Description:... (6 Replies)
Hi,
I am currently filtering a file, "BUILD_TIMES", that has multiple column of information in it. An example of the data is as follows;
Fri Nov 5 15:31:33 2010 00:28:17 R7_BCGNOFJ_70.68
Fri Nov 5 20:57:41 2010 00:07:21 R7_ADJCEL_80.6
Wed Nov 10 17:33:21 2010 00:01:13 R7_BCTTEST3_80.1X... (7 Replies)
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Would appear to me to be a farily simple question but having search all the threads I can't find the answer .. I just want sed to output the single line in a file that contains two string anywhere on the line..
e.g. currently using this command
sed -n -e'/str1/p' -e '/str2/p' < file
and... (3 Replies)
Hi,
I am trying to convert multiple Unix pipe symbol or bar into single |. I have tried with the following sed statements, but, no success :(. I need it using sed only
echo "sed 's/\|\+/\|/g'
sed 's/*/\|/'
sed 's/\|*/|/'
sed -r 's/\|+/\|/'
However, the below awk code is working fine.... (4 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi All,
I am new to scripting. Could you please assist me .
Here is my requirement. I have written a script that has 2 option flags defined.
-l) calls some function with the arguments passed in front of -l
-r) calls second function with the arguments passed in front of -r
*) calls the... (7 Replies)
Discussion started by: Jay Deshpande
7 Replies
LEARN ABOUT OSF1
wtmpconvert
wtmpconvert(8) System Manager's Manual wtmpconvert(8)NAME
wtmpconvert - Modify connect time accounting records from DIGITAL UNIX releases 4.0x and prior to new format
SYNOPSIS
/usr/lbin/wtmpconvert [-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 wtmpconvert command reads records from a connect time accounting file, such as /var/adm/wtmp, and converts the record format to the
updated struct utmp format. If no output file is specified or if the output file path is identical to the input file path, wtmpconvert
makes a backup copy of the original input file using the following algorithm: If filename.orig exists. Where n is a unique number.
The wtmpconvert 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.
EXIT STATUS
Success. An error occurred.
EXAMPLES
To convert an old format accounting file to the new format: wtmpconvert /var/adm/wtmp.prev
Upon completion of this command, /var/adm/wtmp.prev will have been converted to the new format. The original /var/adm/wtmp.prev is
renamed to /var/adm/wtmp.prev.orig. To convert a wtmp file in new format to the old format: wtmpconvert -r /var/adm/wtmp
/var/adm/wtmp.old
FILES
Accounting header files that define the format for the login database file. The active login/logoff database files.
SEE ALSO
Commands: acct(8), acctcon(8), acctmerg(8), date(1), runacct(8)
Functions: getutent(3)
Files: utmp(4), wtmp(4)wtmpconvert(8)