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 DEBIAN
ocf_heartbeat_sfex
OCF_HEARTBEAT_SFEX(7) OCF resource agents OCF_HEARTBEAT_SFEX(7)NAME
ocf_heartbeat_sfex - Manages exclusive access to shared storage using Shared Disk File EXclusiveness (SF-EX)
SYNOPSIS
sfex [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
Resource script for SF-EX. It manages a shared storage medium exclusively .
SUPPORTED PARAMETERS
device
Block device path that stores exclusive control data. (required, string, no default)
index
Location in block device where exclusive control data is stored. 1 or more is specified. Default is 1. (optional, integer, default 1)
collision_timeout
Waiting time when a collision of lock acquisition is detected. Default is 1 second. (optional, integer, default 1)
monitor_interval
Monitor interval(sec). Default is 10 seconds (optional, integer, default 10)
lock_timeout
Valid term of lock(sec). Default is 100 seconds. The lock_timeout is calculated by the following formula. .sp lock_timeout =
monitor_interval + "The expiration time of the lock" .sp We suggest 90 seconds as a default value of the "The expiration time of the
lock", but you should change it in consideration of access delay to the shared disk and the switch time of the multipath driver. .sp
The lock timeout have an impact on start action timeout because start action timeout value is calculated by the following formula. .sp
start timeout = collision_timeout + lock_timeout + "safety margin" .sp The "safety margin" is decided within the range of about 10-20
seconds(It depends on your system requirement). (optional, integer, default 100)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 120s.
stop
Stops the resource. Suggested minimum timeout: 20s.
monitor
Performs a detailed status check. Suggested minimum timeout: 10s. Suggested interval: 10s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a sfex resource using the crm(8) shell:
primitive p_sfex ocf:heartbeat:sfex
params
device=string
op monitor depth="0" timeout="10s" interval="10s"
SEE ALSO
http://www.linux-ha.org/wiki/sfex_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_SFEX(7)