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.
This what it looks like just trying to copy it into an alias. I would really prefer an alias over a function or creating a shellscript.
Hello all,
I'm trying to run a script of this format -
for i in $(cat <file>); do
grep $i <file1>|awk '{print $i, $1, $2}'
It's not working - does anyone know how this can be done?
Khoom (5 Replies)
Hello,
I have a file with 4 columns.
An arbitrary example is shown below:
a Tp 10 xyz
b Tq 8 abc
c Tp 99 pqr
d Tp 44 rst
e Tr 98 efg
Based on the values in col 2 and col 3, I will execute another program.
I have been running this:... (5 Replies)
Hi,
I'm new with this stuff, but I hope you can help me.
This is what I'm trying to do:
for id in $var; do
awk '{if ($1 == $id) print $2}' merg_data.dat > neigh.tmp
done
I need that for every "id", awk search the first column of the file merg_data.dat which contains "id" and... (3 Replies)
Hi all,
I have a series of directories which i open regularly. I want create an alias so that i can pass the direcotry name to alias and then this commands makes Cd to the path i need. COuld you please help on how to create an alias
ex of what i am trying but couldn't succeeded
#alias... (1 Reply)
Hi,
I am trying to write a bash script in which I need to pass a external variable to the awk program. I tired using -v but it not accepting the value.
Here is my sample code.
#!/usr/bin/bash
######################################################################################
####... (5 Replies)
Hi All,
I am new to AWK programming. I have the following for loop in my awk program.
cat printhtml.awk:
BEGIN
-------- <some code here>
END{
----------<some code here>
for(N=0; N<H; N++)
{
for(M=5; M<D; M++) print "\t" D "";
}
-----
}
... (2 Replies)
Hello All,
May i please why my shell variable is not getting passed into awk script.
#!/bin/bash -vx
i="1EB07C50"
/bin/awk -v ID="$i" '/ID/ {match($0,/ID/);print substr($0,RSTART,RLENGTH)}' /var/log/ScriptLogs/keys.13556.txt
Thank you. (1 Reply)
I have file called in in.txt contains with the below lines I want to display the lines between the value which I would be passing.
one
two
three
four
five
ten
six
seven
eight
Expected output if I have passed one and ten
two
three
four
five (8 Replies)
Discussion started by: mychbears
8 Replies
LEARN ABOUT REDHAT
xrandr
XRANDR(1) General Commands Manual XRANDR(1)NAME
xrandr - primitive command line interface to RandR extension
SYNOPSIS
xrandr [-help] [-display display] [-o orientation] [-q] [-v] [-s size] [-x] [-y] [--screen snum] [--verbose]
DESCRIPTION
Xrandr is uses to set the screen size, orientation and/or reflection. The -s option is a small integer index used to specify which size
the screen should be set to. To find out what sizes are available, use the -q option, which reports the sizes available, the current rota-
tion, and the possible rotations and reflections. The default size is the first size specified in the list. The -o option is used to
specify the orientation of the screen, and can be one of Inormal inverted left right 0 1 2 3".
The -x option instructs the server to reflect the screen on the X axis. The -y option instructs the server to reflect the screen on the Y
axis. Reflection is applied after rotation.
The -help option prints out a usage summary. The --verbose option tells you what xrandr is doing, selects for events, and tells you when
events are received to enable debugging.
SEE ALSO Xrandr(3)AUTHORS
Keith Packard, XFree86 Core Team and Cambridge Research Laboratory, HP Labs, HP. and Jim Gettys, Cambridge Research Laboratory, HP Labs,
HP.
XFree86 Version 1.0 XRANDR(1)