Sponsored Content
Full Discussion: Why my awk doesn't work?
Top Forums Shell Programming and Scripting Why my awk doesn't work? Post 302919885 by yanglei_fage on Sunday 5th of October 2014 10:10:33 AM
Old 10-05-2014
Why my awk doesn't work?

Code:
root@SDP_Wildcat_Pass-3-C1:~# cat /proc/driver/rtc                                 
rtc_time    : 05:29:40
rtc_date    : 2014-12-19
alrm_time    : 01:51:53
alrm_date    : 2014-12-20
alarm_IRQ    : no
alrm_pending    : no
update IRQ enabled    : no
periodic IRQ enabled    : no
periodic IRQ frequency    : 1024
max user IRQ frequency    : 64
24hr        : yes
periodic_IRQ    : no
update_IRQ    : no
HPET_emulated    : yes
BCD        : yes
DST_enable    : no
periodic_freq    : 1024
batt_status    : okay

it's wrong with below command
Code:
root@SDP_Wildcat_Pass-3-C1:~# cat /proc/driver/rtc |awk -F: "/alrm_time/{print $3}"
alrm_time    : 01:51:53

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

awk -v -- Why doesn't my example work?

Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing: foreach num ( 6 5 4 ) awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}' end I would expect the following output: ... (3 Replies)
Discussion started by: treesloth
3 Replies

4. Shell Programming and Scripting

Awk: Can anyone tell me why this doesn't work?

If there exists a field in stdin, print it, otherwise, print hello..... These print nothing: cat /dev/null | awk '{if ( length > 0 ) print $1; else print "hello"}' cat /dev/null | awk '{if ( $1 ) print $1; else print "hello"}'But the scripts work if I run them directly in a terminal: ... (8 Replies)
Discussion started by: ksheller
8 Replies

5. Shell Programming and Scripting

Awk split doesn't work for empty delimiter

Does anyone know how will I make awk's split work with empty or null separator/delimiter? echo ABCD | awk '{ split($0,arr,""); print arr; }' I need output like: A B C D I am under HP-UX (5 Replies)
Discussion started by: Orbix
5 Replies

6. Shell Programming and Scripting

Awk -- why doesn't my min work?

So, I have a files with entries in this format: servername,username,sub_username,useless_datapoint,mail_size So, a few sample lines: server_a,bob,jane,useless,112351 server_a,bob,jim,useless,421193 server_a,bob,bob,useless,0029385 server_a,karen,will,useless,112351... (3 Replies)
Discussion started by: treesloth
3 Replies

7. Shell Programming and Scripting

HELP: If Doesn't Work in AWK

Hi! I have a somehow big file (almost 3000 lines long and thirteen columns). Some lines have no value at all or, at least, are incomplete. The columns' values that have no data are marked with a "-" and the corresponding line (the line that owns that value) should be discarded and not used. ... (5 Replies)
Discussion started by: Marcelo de Brit
5 Replies

8. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

9. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
csx_RequestIRQ(9F)					   Kernel Functions for Drivers 					csx_RequestIRQ(9F)

NAME
csx_RequestIRQ, csx_ReleaseIRQ - request or release IRQ resource SYNOPSIS
#include <sys/pccard.h> int32_t csx_RequestIRQ(client_handle_t ch, irq_req_t *ir); int32_t csx_ReleaseIRQ(client_handle_t ch, irq_req_t *ir); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). ir Pointer to an irq_req_t structure. DESCRIPTION
The function csx_RequestIRQ() requests an IRQ resource and registers the client's IRQ handler with Card Services. If a client requires an IRQ,csx_RequestIRQ() must be called to request an IRQ resource as well as to register the client's IRQ handler with Card Services. The client will not receive callbacks at the IRQ callback handler until csx_RequestConfiguration(9F) or csx_ModifyConfigura- tion(9F) has successfully returned when either of these functions are called with the CONF_ENABLE_IRQ_STEERING bit set. The function csx_ReleaseIRQ() releases a previously requested IRQ resource. The Card Services IRQ resource list is adjusted by csx_ReleaseIRQ(). Depending on the adapter hardware, the host bus IRQ connection might also be disabled. Client IRQ handlers always run above lock level and so should take care to perform only Solaris operations that are appropriate for an above-lock-level IRQ handler. csx_RequestIRQ() fails if it has already been called without a corresponding csx_ReleaseIRQ(). STRUCTURE MEMBERS
The structure members of irq_req_t are: uint32_t Socket; /* socket number */ uint32_t Attributes; /* IRQ attribute flags */ csfunction_t *irq_handler; /* IRQ handler */ void *irq_handler_arg; /* IRQ handler argument */ ddi_iblock_cookie_t *iblk_cookie; /* IRQ interrupt /* block cookie */ ddi_idevice_cookie_t *idev_cookie; /* IRQ interrupt device /* cookie */ The fields are defined as follows: Socket Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number. Attributes This field is bit-mapped. It specifies details about the type of IRQ desired by the client. The following bits are defined: IRQ_TYPE_EXCLUSIVE IRQ is exclusive to this socket. This bit must be set. It indicates that the system IRQ is dedi- cated to this PC Card. irq_handler The client IRQ callback handler entry point is passed in the irq_handler field. irq_handler_arg The client can use the irq_handler_arg field to pass client-specific data to the client IRQ callback handler. iblk_cookie These fields must be used by the client to set up mutexes that are used in the client's IRQ callback handler. idev_cookie For a specific csx_ReleaseIRQ() call, the values in the irq_req_t structure must be the same as those returned from the previous csx_RequestIRQ() call; otherwise, CS_BAD_ARGS is returned and no changes are made to Card Services resources or the socket and adapter hardware. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_ARGS IRQ description does not match allocation. CS_BAD_ATTRIBUTE IRQ_TYPE_EXCLUSIVE not set, or an unsupported or reserved bit is set. CS_BAD_HANDLE Client handle is invalid or csx_RequestConfiguration(9F) not done. CS_BAD_IRQ Unable to allocate IRQ resources. CS_IN_USE csx_RequestIRQ() already done or a previous csx_RequestIRQ() has not been done for a corresponding csx_Relea- seIRQ(). CS_CONFIGURATION_LOCKED csx_RequestConfiguration(9F) already done or csx_ReleaseConfiguration(9F) has not been done. CS_NO_CARD No PC Card in socket. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
These functions may be called from user or kernel context. SEE ALSO
csx_ReleaseConfiguration(9F), csx_RequestConfiguration(9F) PC Card Card 95 Standard, PCMCIA/JEIDA SunOS 5.11 19 Jul 1996 csx_RequestIRQ(9F)
All times are GMT -4. The time now is 10:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy