You could add the variable directly into the .profile as follows, I tried in bash and it worked successfully for me.
Off course use a new session for server after adding this to .profile to make alias effective.
Last edited by RavinderSingh13; 02-09-2016 at 05:12 AM..
Reason: Added one more solution where placing the value of command into alias name by using $ too now.
Hi all,
I'm trying to define an alias with an embeded awk command:
alias kpipe='kill `psme| grep "ifw -r" | grep -v "grep ifw -r"| awk '{print $2}'`'
The problem is that the awk command (awk '{print $2}') contains two ' ..' quotes. So bash assumes that the first awk quote corresponds to... (5 Replies)
Good morning
I would like kindly to ask you to help me with creation of alias with awk command.
alias a="awk {print $1 "| " $2 "| " $3 "| " $4 "| " $5 "| " $6 "| " $7 "| " $8 "| " $13 "| " }"
there is some error but I don't find it please explain me what is error and how can be avoid... (1 Reply)
Good morning
I would like kindly to ask you to help me with creation of alias with awk command.
alias a="awk {print $1 "| " $2 "| " $3 "| " $4 "| " $5 "| " $6 "| " $7 "| " $8 "| " $13 "| " }"
there is some error but I don't find it please explain me what is error and how can be avoid... (5 Replies)
Hello,
How can I make an alias of an AWK one liner that prints specific lines from a file like below?
# from a command like this:
awk 'NR == 100, NR == 150' file.cfg
The alias I want to make should work like this(I guess):
<alias_command> <file.cfg><start_line><end_line>
So the... (1 Reply)
I'd like to define an alias to awk's begin statement since I use awk with different delimiters all the time and it is tiresome to type awk '{OFS="\t";FS="\t"}{BLAH BLAH}' every time. The problem is that bash won't let me make an alias with an open quote, which is necessary for the BEGIN alias to... (3 Replies)
Hi,
I am trying to write the following command as an alias in my .bashrc file.
bjobs -u all | awk '{if (NR > 1) {username++;}}END{{print"\nJOBS BY USER:\n"} for (i in username) {print username,i;}{print"\n Total Jobs=",NR-1,"\n" }}'
The command simply puts how many jobs each user is... (2 Replies)
I need to login to one server and then switch the user and set a number alias. But i cant modify the .profile file.
I have one script avi1.sh
$ more avi.sh
sudo su - bil
sh avi1.sh
and in home directory of bil i have avi1.sh that says
$ more avi1.sh
alias l='ls -ltr'
alias b='cd... (7 Replies)
Hi to all,
I'm facing some problems when adding an alias like:
#alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'"
and when I enter:
#list
I get:
Syntax Error The source line is 1.
The error context is
{ print >>> , <<<
awk:... (3 Replies)
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
I am trying to turn this into an alias with no luck. I would then like to put the alias into my bashrc file. I know awk is very picky about quotes. I have tried every version of quotes, single quotes, double quotes, and backslashes that I can think of.
VAR=$(xrandr | awk '$2=="connected"{s=$1}... (3 Replies)
Discussion started by: cokedude
3 Replies
LEARN ABOUT REDHAT
overview.fmt
OVERVIEW.FMT(5) File Formats Manual OVERVIEW.FMT(5)NAME
overview.fmt - format of news overview database
DESCRIPTION
The file <pathetc in inn.conf>/overview.fmt specifies the organization of the news overview database. Blank lines and lines beginning with
a number sign (``#'') are ignored. The order of lines in this file is important; it determines the order in which the fields will appear
in the database.
Most lines will consist of an article header name, optionally followed by a colon. A trailing set of lines can have the word ``full''
appear after the colon; this indicates that the header should appear as well as its value.
If this file is changed, new overview records will be constructed with the modified format. If it is desired to update existing records,
it is necessary to rebuild the existing overview database using makehistory(8) after removing all existing overview files.
``Xref:full'' must be included, or innd(8) and other programs which utilize overview method cannot start.
The default file, show below, is compatible with Geoff Collyer's ``nov'' package:
Subject:
From:
Date:
Message-ID:
References:
Bytes:
Lines:
Xref:full
Usually the only modifications which should be made to the default file are additions of new fields to the end of the file; all such fields
should have ``full'' after the colon. The first eight fields should remain in the same order as above.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Intended to be compatible with the nov package written by Geoff Collyer
<geoff@world.std.com>. This is revision 1.6.6.3, dated 2002/01/05.
SEE ALSO inn.conf(5)OVERVIEW.FMT(5)