hi My requirement is this:
I have a file having around 100000 records pipe delimited. Now I want to compare record 1 with record 2 and similarly record3 with record 4, this goes on.. For this purpose i put a script as follows:
#!bin/ksh
ct_line=1
nxt_line=`expr ${ct_line} + 1`
awk -F "|"... (1 Reply)
Hi,
I was trying to remove the blank from beginning of a line.
when I try:
sed 's/^ +//' filename
it does not work
but when I try
sed 's/^ *//' filename
it works
But I think the first command should have also replaced any line with one or more blanks.
Kindly help me in understanding... (5 Replies)
I am having a problem where the Compute field/column is spilling over to the new line. Here's the piece of code and the o/p:-
Code Sniplet:-
for id in `qstat -u "*" -q "$Queue" -s r |sed -n '3,$ p'|awk -F" " '{print $1}'`
do
NODELIST=`cat /scratch/$id.hostlist.*|awk -F" " '{print $1,$2}'|tr '... (5 Replies)
I have a report that I'd like to print columns headers on. The code appears as follows:
gawk '{for (i=1; i<=NF; i++) if ($i < 0) $i = -$i; print }'|gawk '{ printf "%-78s%-30s%-30s%-30s\n", $1,$2, $3, $4 }' |awk '{for (i=1; i<=NF; i++) if ($i < 0) $i = -$i; print }' report_1020I am trying to make... (3 Replies)
It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this:
For example,
apple
-orange
tree
pipe-
banana-shake
dupe-
What my output should look like:
apple
orange
tree... (1 Reply)
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Hi,
I have been searching how to do this but I can't seem to find how to do it. Hopefully someone can help.
I have multiplr files, 100's example 12345-zxys.213423.zyz.txt. I want to be able to take all these files and remove the first '12345-' from each of the files. '12345-' these characters... (5 Replies)
Hey Guys,
Earlier I asked a question under Solaris, which I got great help... thanks.
Although I got the script working for what it really needed to do, I am looking for a bit of help to change the output for nicer reading.
my script gets a list of zones under a global-zone and puts this... (4 Replies)
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.
I am using the following command
sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln
This produces
@section Correlations between
seismograms,,,,}}
... (5 Replies)
Discussion started by: Danette
5 Replies
LEARN ABOUT NETBSD
iprop-log
IPROP-LOG(8) BSD System Manager's Manual IPROP-LOG(8)NAME
iprop-log -- maintain the iprop log file
SYNOPSIS
iprop-log [--version] [-h | --help] command
iprop-log truncate [-c file | --config-file=file] [-r string | --realm=string] [-h | --help]
iprop-log dump [-c file | --config-file=file] [-r string | --realm=string] [-h | --help]
iprop-log replay [--start-version=version-number] [--end-version=version-number] [-c file | --config-file=file] [-r string | --realm=string]
[-h | --help]
DESCRIPTION
Supported options:
--version
-h, --help
command can be one of the following:
truncate
-c file, --config-file=file
configuration file
-r string, --realm=string
realm
Truncates the log. Sets the new logs version number for the to the last entry of the old log. If the log is truncted by emptying
the file, the log will start over at the first version (0).
dump
-c file, --config-file=file
configuration file
-r string, --realm=string
realm
Print out all entries in the log to standard output.
replay
--start-version=version-number
start replay with this version
--end-version=version-number
end replay with this version
-c file, --config-file=file
configuration file
-r string, --realm=string
realm
Replay the changes from specified entries (or all if none is specified) in the transaction log to the database.
last-version
-c file, --config-file=file
configuration file
-r string, --realm=string
realm
prints the version of the last log entry.
SEE ALSO iprop(8)BSD February 18, 2007 BSD