Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Regular expression on hex color codes Post 302361442 by figaro on Tuesday 13th of October 2009 08:04:02 AM
Old 10-13-2009
Thank you for your response and it seems that \U does not work indeed, as you suggested. The code works on Linux however.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regular Expression + Aritmetical Expression

Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant. THX! (2 Replies)
Discussion started by: Z0mby
2 Replies

2. Shell Programming and Scripting

regular expression help

hello all.. I'm a bit new to this site.. and I hope to learn alot.. but I've been having a hard time figuring this out. I'm horrible with regular expressions.. so any help would be greatly appreciated. I have a file with a list of names like this: LASTNAME, FIRSTNAME, MIDDLEINITIAL how can... (5 Replies)
Discussion started by: mac2118
5 Replies

3. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

4. UNIX for Dummies Questions & Answers

Using color escape codes in less

Hi all, Not sure how "for dummies" this question is, but I'd better use understatement... A. My Environment ============== I am using RedHat Linux, version 2.6.18-53.el5. When I type less --version I get: less 394 Copyright (C) 1984-2005 Mark Nudelman ... My terminal is configured... (1 Reply)
Discussion started by: Source2Exe
1 Replies

5. Shell Programming and Scripting

Integer expression expected: with regular expression

CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error. source $CA_VERSION_DATA if * ] then echo "CA_RELESE $CA_RELEASE is invalid" exit -1 fi + source /etc/ncgl/ca_version_data ++ CA_PRODUCT_ID=samxts ++ CA_RELEASE=6 ++ CA_WEEK_NO=7 ++... (3 Replies)
Discussion started by: ketkee1985
3 Replies

6. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

7. Programming

Using ANSI color codes in gcc compiled program

I have put some yellow color codes and works well. I call the funstion using print_usage(stderr, 0); I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf. Or have a format followed by the strings I want to output. ... (5 Replies)
Discussion started by: kristinu
5 Replies

8. UNIX for Dummies Questions & Answers

Display file with escaped color codes

Hi, I have a file containing color codes: Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies

9. UNIX for Advanced & Expert Users

sed: -e expression #1, char 0: no previous regular expression

Hello All, I'm trying to extract the lines between two consecutive elements of an array from a file. My array looks like: problem_arr=(PRS111 PRS213 PRS234) j=0 while } ] do k=`expr $j + 1` sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt ---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies

10. Shell Programming and Scripting

Help with awk color codes based on condition

HI i have two files say test and test1 Test.txt Code: Lun01 2TB 1.99TB 99.6% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Lun04 2TB 1.55TB 89.6% Code: Test1.txt Lun01 2TB 1.99TB 89.5% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Requirement is to compare... (6 Replies)
Discussion started by: venkitesh
6 Replies
S390_STHYI(2)							System Calls Manual						     S390_STHYI(2)

NAME
s390_sthyi - emulate STHYI instruction SYNOPSIS
#include <asm/unistd.h> int s390_sthyi(unsigned long function_code, void *resp_buffer, uint64_t *return_code, unsigned long flags); DESCRIPTION
The s390_sthyi() system call emulates the STHYI (Store Hypervisor Information) instruction. It provides hardware resource information for the machine and its virtualization levels. This includes CPU type and capacity, as well as the machine model and other metrics. The function_code argument indicates which function to perform. The following code(s) are supported: 0 Return CP (Central Processor) and IFL (Integrated Facility for Linux) capacity information. The resp_buffer argument specifies the address of a response buffer. When the function_code is 0, the buffer must be one page (4K) in size. If the system call returns 0, the response buffer will be filled with CPU capacity information. Otherwise, the response buffer's content is unchanged. The return_code argument stores the return code of the STHYI instruction, using one of the following values: 0 Success. 4 Unsupported function code. For further details about return_code, function_code, and resp_buffer, see the reference given in NOTES. The flags argument is provided to allow for future extensions and currently must be set to 0. RETURN VALUE
On success (that is: emulation succeeded), the return value of s390_sthyi() matches the condition code of the STHYI instructions, which is a value in the range [0..3]. A return value of 0 indicates that CPU capacity information is stored in *resp_buffer. A return value of 3 indicates "unsupported function code" and the content of *resp_buffer is unchanged. The return values 1 and 2 are reserved. On error, -1 is returned, and errno is set appropriately. ERRORS
EFAULT The value specified in resp_buffer or return_code is not a valid address. EINVAL The value specified in flags is nonzero. ENOMEM Allocating memory for handling the CPU capacity information failed. EOPNOTSUPP The value specified in function_code is not valid. VERSIONS
This system call is available since Linux 4.15. CONFORMING TO
This Linux-specific system call is available only on the s390 architecture. NOTES
Glibc does not provide a wrapper for this system call, use syscall(2) to call it. For details of the STHYI instruction, see the documentation page <https://www.ibm.com/support/knowledgecenter/SSB27U_6.3.0 /com.ibm.zvm.v630.hcpb4/hcpb4sth.htm>. When the system call interface is used, the response buffer doesn't have to fulfill alignment requirements described in the STHYI instruc- tion definition. The kernel caches the response (for up to one second, as of Linux 4.16). Subsequent system call invocations may return the cached response. SEE ALSO
syscall(2) Linux Programmer's Manual 2019-03-06 S390_STHYI(2)
All times are GMT -4. The time now is 08:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy