03-01-2013
Thanks scrutinizer. I got the output. I am using Solaris 10.
I was wondering if you could help me if statement. as mention in the code. I want to check if the entered values is numeric and it should be 4 digit. is there any way to check if the entered values are digits for frame and the entered values are hexa decimal for lun_ids and numeric for meta_way.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need help with an awk question. i am looking to have an external variable be defined outside of awk but used in awk. so if we have fields $1, $2, $3 so on and so forth, i would like to be able to dictate what field is being printed by something like $. so if i had a counter called test, make it 3... (8 Replies)
Discussion started by: pupp
8 Replies
2. Shell Programming and Scripting
So I have a if statement inside an awk to check if $2 of a awk equals a specific IP but the test fails. So here is what I have.
# !/bin/sh
echo "Enter client ID"
read ID
echo "Enter month (01, 02, 03)"
read month
echo "Enter day (03, 15)"
read day
echo "Enter Year (07, 08)"
read... (6 Replies)
Discussion started by: doublejz
6 Replies
3. Shell Programming and Scripting
Dear all,
¿How can i insert a variable in a AWK pattern?
I have almost succeeded in solving a puzzle with AWK but now i want to make a script. Let me explain.
cat file.txt | awk 'BEGIN {RS="\\n\\n"} /tux/ { print "\n"$0 }'
I know that this command makes right what i want to do, but mi... (8 Replies)
Discussion started by: antuan
8 Replies
4. Shell Programming and Scripting
Hello,
I am running a bash script under linux which first defines an CA-array like
j=0
num1=120.00
num2=10.00
until
do
CA='echo $num1 + $j*$num2'
j=$
done
within the later awk section of this same script I want to read data from a file. If the value of the second column is... (3 Replies)
Discussion started by: MotAah
3 Replies
5. Shell Programming and Scripting
I want to incorporate the variable in the for statement as a column of my processed file. In the INCORRECT example below, it is $i which corresponds to the i in my for loop:
for i in x86_64 i686; do
awk '{ print $1" "$4" "$5" "$i }'awk $file-$i > processed-$i.log
doneThanks! (3 Replies)
Discussion started by: graysky
3 Replies
6. Shell Programming and Scripting
I'm trying to get the universities result data into different file, where the $9 contains unversity field and field7,4 & 5 contains the keys to sort the students by marks. How to use uni variable to match against $9 inside awk?
c=0
for uni in `cat /tmp/global_rank| awk -F ',' '{print... (1 Reply)
Discussion started by: InduInduIndu
1 Replies
7. Shell Programming and Scripting
Hi,
How can I modify the FILETYPE command ?
I want to provide the file extension, like txt, root .?
Thanks,
#!/bin/bash
FROM=$1
TO=$2
FILETYPE=$3
... (4 Replies)
Discussion started by: nrjrasaxena
4 Replies
8. Shell Programming and Scripting
consider the script below
sh /opt/hqe/hqapi1-client-5.0.0/bin/hqapi.sh alert list --host=localhost --port=7443 --user=hqadmin --password=hqadmin --secure=true >/tmp/alerts.xml
awk -F'' '{for(i=1;i<=NF;i++){
if($i=="Alert id") {
if(id!="")
if(dt!=""){
cmd="sh someScript.sh... (2 Replies)
Discussion started by: vivek d r
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: ctrld
2 Replies
10. Shell Programming and Scripting
So, I've been playing with speeding up some analysis we do by using multiple threads of awk (actually, mawk, but code-compatible as far as I use it) on multiple CPU cores. So, I have a big data file and I have several copies of exactly the same processor script, written in mawk. I also have a... (8 Replies)
Discussion started by: treesloth
8 Replies
LEARN ABOUT OSF1
sys_attrs_gpc_input
sys_attrs_gpc_input(5) File Formats Manual sys_attrs_gpc_input(5)
NAME
sys_attrs_gpc_input - gpc_input subsystem attributes
DESCRIPTION
This reference page lists and describes attributes for the GPC Input (gpc_input) kernel subsystem. This subsystem handles mouse and key-
board input for both old style LK* keyboards and serial mice, and the newer PC-style (PS/2) keyboards and mice. In all supported scan code-
sets, unique single-byte scan codes differentiate the standalone Insert, Home, Page Up, Page Down, Delete, and End keys from the same keys
on the numeric keypad (with Num Lock toggled to off).
Refer to the sys_attrs(5) reference page for an introduction to the topic of kernel subsystem attributes.
The gpc subsystem has a number of visible attributes. Of these, only the following should ever be modified:
A value that identifies the scan codeset generated by the keyboard. Only two values are supported for this attribute. The scan code-
sets that these values identify differ in how internal keyboard hardware distinguishes between the numeric keypad's Up Arrow
(entered with with Num Lock toggled off) and the standalone Up Arrow key. Keyboard hardware sends different single-byte scan codes
to distinguish the standalone Up Arrow and the Up Arrow entered through the numeric keyboard (with Num Lock toggled off). Keyboard
hardware sends two bytes for the standalone Up Arrow and a single-byte scan code for the Up Arrow entered through the numeric key-
board.
These values are intended to be set by system software, not users. Although both values (scan codesets) work with most of the Compaq
keyboards (both LK* and PC-style) used with Tru64 UNIX systems, 3 identifies the scan codeset that is most efficient for these key-
boards. The keyboard of the AlphaBook (laptop) computer is the only supported keyboard that requires the 2 setting. The scan code-
sets identified by these values may work with other (third-party) keyboards; however, Compaq does not test or support other key-
boards for use with Tru64 UNIX systems.
It is possible to set kbd_scancode to a 0 or 1 value. These values are currently undefined and will result in one of the following
console errors:
gpc_input_configure: scan code not supported
ps2_input_configure: scan code not supported
These errors are displayed independently of the setting for the gpc_developer_debug attribute.
Enables (1) or disables (0) boot- and run-time console messages used by systems programmers to debug device driver configuration
problems.
Default value: 0 (disabled)
SEE ALSO
sys_attrs(5)
sys_attrs_gpc_input(5)