Sponsored Content
Top Forums Shell Programming and Scripting AIX to RHEL migration - awk treating 0e[0-9]+ as 0 instead of string issue Post 302997460 by RudiC on Sunday 14th of May 2017 02:20:07 AM
Old 05-14-2017
Try a string conversion:
Code:
echo "abc|0e123456789|xyz|1234|kdkd|dfs" | awk -F "|" '{ if ( ! ($2 "")) { print $2 " is empty or NULL " } else { print $2 " is not empty "}}'
0e123456789 is not empty

But - no integer conversion is done for sheer assignments or usage in e.g. constucting an array index .
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

AIX Migration

Hi , Migrating AIX 4.3.3 ML10 to 5.3 ML1 (retaining 32 bit) after successfully going through 5 of the 5.3 Install CD's. After "All fileset's processed successfully " message I was told that system would reboot and then I would get prompted for setting TERm type ( i have an ascii ibm3151) and... (1 Reply)
Discussion started by: Student37
1 Replies

2. Shell Programming and Scripting

awk issue on AIX

Hi, two teams at two locations - A & B. At location A, we have AIX 5.3 and at location B, we have AIX 5.1. We execute the below awk command in loc A and it executes successfully(part of a larger script). But the same does not get executed in the loc B server. We are not able to access the loc B... (1 Reply)
Discussion started by: ranj@chn
1 Replies

3. AIX

AIX 5.2 to 5.3 migration

Hello All, We want to upgrade our 44p Model 270 from AIX 5.2 to 5.3. This is a standalone devlopment server but downtime is something we don't want because we have a short development deadline looming. I have no tape drive to make backups to. I myself am a developer and don't have any... (4 Replies)
Discussion started by: Fred Vogel
4 Replies

4. AIX

IY17981 fix required for aix 4.3.3 to aix 5L migration but not found

Hi, redbook documentation is telling that IY17981 fix is required for aix 4.3.3 to aix 5L migration. But there is no mention about that fix in any ML installation packages. - My system is ML11 : oslevel –r 4330-11 - But xlC.rte is on wrong version : lslpp -L xlC.rte xlC.rte ... (3 Replies)
Discussion started by: astjen
3 Replies

5. Shell Programming and Scripting

Treating string as date ?

Is there a way to treat a string as date and compare it to the current date? lets assum inpu lik $ cat myfile Name Last login ************************** Sara 2/13/2012 kalpeer 2/15/2012 ygemici 2/14/2012 we want to display the name who logged in during the last #... (4 Replies)
Discussion started by: Sara_84
4 Replies

6. Shell Programming and Scripting

awk - treating remaining columns as one

Hi all, For no particular reason, I would like to use awk on a file that contains multiple columns, but let's say only columns 1 and 2 have some text values, and the remainder of the line contains text that I would like to treat as one column, considering I have spaces as delimiter for the... (33 Replies)
Discussion started by: ppucci
33 Replies

7. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

8. AIX

AIX - FC Switch migration, SAN Migration question!

I'm New to AIX / VIOS We're doing a FC switch cutover on an ibm device, connected via SAN. How do I tell if one path to my remote disk is lost? (aix lvm) How do I tell when my link is down on my HBA port? Appreciate your help, very much! (4 Replies)
Discussion started by: BG_JrAdmin
4 Replies

9. AIX

AIX Migration issue with EMC ODM sets

Hi Experts , I want to start migrating our AIX 6.1 to AIX 7.1 . I am planning to use alt_disk_migration . Chris gibson has awesome documentation in the internet. However I am running into an issue with EMC odm filesets . So my current OS is AIX 6.1. and I have this : lslpp -l | grep EMC ... (7 Replies)
Discussion started by: JME2015
7 Replies

10. Shell Programming and Scripting

awk treating variables differently in UNIX-Linux

Hi, awk seem to be acting differently in Unix and Linux when it comes to formatting. This is making it difficult to migrate scripts. for example: UNIX: echo "123" |awk '{printf ("%05s\n" ,$1)}' 00123 echo "123" |awk '{printf ("%05d\n" ,$1)}' 00123 echo "S12" |awk '{printf ("%05s\n"... (9 Replies)
Discussion started by: wanderingmind16
9 Replies
OCF_HEARTBEAT_XEN(7)						OCF resource agents					      OCF_HEARTBEAT_XEN(7)

NAME
ocf_heartbeat_Xen - Manages Xen unprivileged domains (DomUs) SYNOPSIS
Xen [start | stop | monitor | migrate_to | migrate_from | meta-data | validate-all] DESCRIPTION
Resource Agent for the Xen Hypervisor. Manages Xen virtual machine instances by mapping cluster resource start and stop, to Xen create and shutdown, respectively. A note on names We will try to extract the name from the config file (the xmfile attribute). If you use a simple assignment statement, then you should be fine. Otherwise, if there's some python acrobacy involved such as dynamically assigning names depending on other variables, and we will try to detect this, then please set the name attribute. You should also do that if there is any chance of a pathological situation where a config file might be missing, for example if it resides on a shared storage. If all fails, we finally fall back to the instance id to preserve backward compatibility. Para-virtualized guests can also be migrated by enabling the meta_attribute allow-migrate. SUPPORTED PARAMETERS
xmfile Absolute path to the Xen control file, for this virtual machine. (required, string, no default) name Name of the virtual machine. (optional, string, no default) shutdown_timeout The Xen agent will first try an orderly shutdown using xm shutdown. Should this not succeed within this timeout, the agent will escalate to xm destroy, forcibly killing the node. .sp If this is not set, it will default to two-third of the stop action timeout. .sp Setting this value to 0 forces an immediate destroy. .sp (optional, string, no default) allow_mem_management This parameter enables dynamic adjustment of memory for start and stop actions used for Dom0 and the DomUs. The default is to not adjust memory dynamically. (optional, boolean, default 0) node_ip_attribute In case of a live migration, the system will default to using the IP address associated with the hostname via DNS or /etc/hosts. .sp This parameter allows you to specify a node attribute that will be queried instead for the target node, overriding the IP address. This allows you to use a dedicated network for live migration traffic to a specific node. .sp Warning: make very sure the IP address does point to the right node. Or else the live migration will end up somewhere else, greatly confusing the cluster and causing havoc. (optional, string, no default) reserved_Dom0_memory In case memory management is used, this parameter defines the minimum amount of memory to be reserved for the dom0. The default minimum memory is 512MB. (optional, string, default 512) monitor_scripts To additionally monitor services within the unprivileged domain, add this parameter with a list of scripts to monitor. (optional, string, no default) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 60. stop Stops the resource. Suggested minimum timeout: 40. migrate_from Executes steps necessary for migrating the resource away from the node. Suggested minimum timeout: 120. migrate_to Executes steps necessary for migrating the resource to the node. Suggested minimum timeout: 120. monitor Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 5. EXAMPLE
The following is an example configuration for a Xen resource using the crm(8) shell: primitive p_Xen ocf:heartbeat:Xen params xmfile=string meta allow-migrate="true" op monitor depth="0" timeout="30" interval="10" SEE ALSO
http://www.linux-ha.org/wiki/Xen_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_XEN(7)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy