Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have a problem with "for" and "while" loop in "sh".
I have:
#!/bin/sh
for i in $(seq 1 500000); do
echo $i
doneand it's working in sh on my ubuntu, but when I try to run this on unix(I have access to my university's unix) it crash:
syntax error at line 2: `$' unexpected...... (8 Replies)
Hi.
I have a copy-file script (and a move-file script) that I recently tried to make interactive. I tested the former on three files from a text list, and watched to see what would happen. As the cp command was in a while/do/done loop, there was no pause for input: it wrote the file from the... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
dear all,
i got some questions about for/while loop when working on redirect command output to for/while loop.
take one for example :
in for loop :
allfiles=`find /var/log -maxdepth 1 -type f -mtime +5`
index=1
for ((i=0; i<${#allfiles}; i++)); do
echo "$index:${allfiles}"
... (2 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT CENTOS
tk_unmaintaingeometry
Tk_MaintainGeometry(3) Tk Library Procedures Tk_MaintainGeometry(3)__________________________________________________________________________________________________________________________________________________NAME
Tk_MaintainGeometry, Tk_UnmaintainGeometry - maintain geometry of one window relative to another
SYNOPSIS
#include <tk.h>
Tk_MaintainGeometry(slave, master, x, y, width, height)
Tk_UnmaintainGeometry(slave, master)
ARGUMENTS
Tk_Window slave (in) Window whose geometry is to be controlled.
Tk_Window master (in) Window relative to which slave's geometry will be controlled.
int x (in) Desired x-coordinate of slave in master, measured in pixels from the inside of master's left border to the
outside of slave's left border.
int y (in) Desired y-coordinate of slave in master, measured in pixels from the inside of master's top border to the
outside of slave's top border.
int width (in) Desired width for slave, in pixels.
int height (in) Desired height for slave, in pixels.
_________________________________________________________________DESCRIPTION
Tk_MaintainGeometry and Tk_UnmaintainGeometry make it easier for geometry managers to deal with slaves whose masters are not their parents.
Three problems arise if the master for a slave is not its parent:
[1] The x- and y-position of the slave must be translated from the coordinate system of the master to that of the parent before posi-
tioning the slave.
[2] If the master window, or any of its ancestors up to the slave's parent, is moved, then the slave must be repositioned within its
parent in order to maintain the correct position relative to the master.
[3] If the master or one of its ancestors is mapped or unmapped, then the slave must be mapped or unmapped to correspond.
None of these problems is an issue if the parent and master are the same. For example, if the master or one of its ancestors is unmapped,
the slave is automatically removed by the screen by X.
Tk_MaintainGeometry deals with these problems for slaves whose masters are not their parents, as well as handling the simpler case of
slaves whose masters are their parents. Tk_MaintainGeometry is typically called by a window manager once it has decided where a slave
should be positioned relative to its master. Tk_MaintainGeometry translates the coordinates to the coordinate system of slave's parent and
then moves and resizes the slave appropriately. Furthermore, it remembers the desired position and creates event handlers to monitor the
master and all of its ancestors up to (but not including) the slave's parent. If any of these windows is moved, mapped, or unmapped, the
slave will be adjusted so that it is mapped only when the master is mapped and its geometry relative to the master remains as specified by
x, y, width, and height.
When a window manager relinquishes control over a window, or if it decides that it does not want the window to appear on the screen under
any conditions, it calls Tk_UnmaintainGeometry. Tk_UnmaintainGeometry unmaps the window and cancels any previous calls to Tk_MaintainGeom-
etry for the master-slave pair, so that the slave's geometry and mapped state are no longer maintained automatically. Tk_UnmaintainGeome-
try need not be called by a geometry manager if the slave, the master, or any of the master's ancestors is destroyed: Tk will call it
automatically.
If Tk_MaintainGeometry is called repeatedly for the same master-slave pair, the information from the most recent call supersedes any older
information. If Tk_UnmaintainGeometry is called for a master-slave pair that is is not currently managed, the call has no effect.
KEYWORDS
geometry manager, map, master, parent, position, slave, unmap
Tk 4.0 Tk_MaintainGeometry(3)