Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Display multiple words into a single td tag Post 303038855 by Himanshu1 on Monday 16th of September 2019 01:21:44 AM
Old 09-16-2019
There is no javascript or php allowed.

Redisplaying the problem statement :
Need to write a Unix shell script (bash)
To display active inactive sessions from oracle database in the body of the email. Along with long running queries if any
 

10 More Discussions You Might Find Interesting

1. Programming

how i display number in words

helo i want to implement the following concept in my project write a c/c++ algorithm for : accept a number from the user not greater than 6 digits and display the number in words i.e. if the input from the user is 18265 then the output should be Eighteen Thousand Two Hundred Sixty Five. if the... (3 Replies)
Discussion started by: amitpansuria
3 Replies

2. Shell Programming and Scripting

grep multiple words in a single line

Hi.. How to search for multiple words in a single line using grep?. Eg: Jack and Jill went up the hill Jack and Jill were best friends Humpty and Dumpty were good friends too ---------- I want to extract the 2nd statement(assuming there are several statements with... (11 Replies)
Discussion started by: anduzzi
11 Replies

3. Shell Programming and Scripting

Replace several numbers with respective tag and make a single file

Dear All, I have a final output files as 736645|0| 13879|1| 495563|10| 127933|14| 4975|16| 49038|6| 53560|7| 135115|8| 178857|9| Now I want to replace second column with respective tag as per the value (4 Replies)
Discussion started by: jojo123
4 Replies

4. UNIX Desktop Questions & Answers

Display a specific words from a multiple lines

well, i am so not familiar with this kind of things but i am gonna explain extactly what i am looking for so hopfully someone can figure it out :) i have a command that shows memory usage besides the process name, for example(the command output): 500 kb process_1 600 kb process_2 700 kb... (4 Replies)
Discussion started by: Portabello
4 Replies

5. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

6. Shell Programming and Scripting

Grep multiple words in a single file

Hello All, I'm a newbie/rookie in Shell scipting. I've done oracle export of a table using Export utility. When I do export, it generates 2 files. 1> .dmp file 2> .dmp.log file. In .dmp.log file I have to search for a sentence which goes like '0 records have been inserted' and then... (2 Replies)
Discussion started by: samfisher
2 Replies

7. Shell Programming and Scripting

To search for a particular tag in xml and collate all similar tag values and display them count

I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help File: <xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies

8. Shell Programming and Scripting

Search for a tag and display a message if not found.

Hi All, I am working with a XML file. Below is part for the file. <Emp:Profile> <Emp:Description>Admin</Emp:Description> <Emp:Id>12347</Emp:Id> </Emp:Profile> <Emp:Profile> ... (7 Replies)
Discussion started by: Girish19
7 Replies

9. Shell Programming and Scripting

How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed?

I have the input file like this. Input file: 12.txt 1) There are one or more than one <tr> tags in same line. 2) Some tr tags may have one <td> or more tna one <td> tags within it. 3) Few <td> tags having "<td> &nbsp; </td>". Few having more than one "&nbsp;" entry in it. <tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies

10. Shell Programming and Scripting

XML files with spaces in the tag name, parse & display?

Greetings all, I have an XML file that is being generated from my application, here is a sample of the first tag (That I am trying to remove and display in a list..) Example- <tag one= "data" data="1234" updateTime="1300"> <tag one= "data1" data="1234" updateTime="1300"> <tag... (5 Replies)
Discussion started by: jeffs42885
5 Replies
SD_UID_GET_STATE(3)						 sd_uid_get_state					       SD_UID_GET_STATE(3)

NAME
sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats - Determine login state of a specific Unix user ID SYNOPSIS
#include <systemd/sd-login.h> int sd_uid_get_state(uid_t pid, char** state); int sd_uid_is_on_seat(uid_t pid, int require_active, const char* seat); int sd_uid_get_sessions(uid_t pid, int require_active, char*** sessions); int sd_uid_get_seats(uid_t pid, int require_active, char*** seats); DESCRIPTION
sd_uid_get_state() may be used to determine the login state of a specific Unix user identifier. The following states are currently known: offline (user not logged in at all), lingering (user not logged in, but some user services running), online (user logged in, but not active), active (user logged in on an active seat). In the future additional states might be defined, client code should be written to be robust in regards to additional state strings being returned. The returned string needs to be freed with the libc free(3) call after use. sd_uid_is_on_seat() may be used to determine whether a specific user is logged in or active on a specific seat. Accepts a Unix user identifier and a seat identifier string as parameters. The require_active parameter is a boolean. If non-zero (true) this function will test if the user is active (i.e. has a session that is in the foreground and accepting user input) on the specified seat, otherwise (false) only if the user is logged in (and possibly inactive) on the specified seat. sd_uid_get_sessions() may be used to determine the current sessions of the specified user. Acceptes a Unix user identifier as parameter. The require_active boolean parameter controls whether the returned list shall consist of only those sessions where the user is currently active (true) or where the user is currently logged in at all, possibly inactive (false). The call returns a NULL terminated string array of session identifiers in sessions which needs to be freed by the caller with the libc free(3) call after use, including all the strings referenced. If the string array parameter is passed as NULL the array will not be filled in, but the return code still indicates the number of current sessions. Note that instead of an empty array NULL may be returned and should be considered equivalent to an empty array. Similar, sd_uid_get_seats() may be used to determine the list of seats on which the user currently has sessions. Similar semantics apply, however note that the user may have multiple sessions on the same seat as well as sessions with no attached seat and hence the number of entries in the returned array may differ from the one returned by sd_uid_get_sessions(). RETURN VALUE
On success sd_uid_get_state() returns 0 or a positive integer. If the test succeeds sd_uid_is_on_seat() returns a positive integer, if it fails 0. sd_uid_get_sessions() and sd_uid_get_seats() return the number of entries in the returned arrays. On failure, these calls return a negative errno-style error code. NOTES
The sd_uid_get_state(), sd_uid_is_on_seat(), sd_uid_get_sessions(), and sd_uid_get_seats() interfaces are available as shared library, which can be compiled and linked to with the libsystemd-login pkg-config(1) file. SEE ALSO
systemd(1), sd-login(7), sd_pid_get_owner_uid(3) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 SD_UID_GET_STATE(3)
All times are GMT -4. The time now is 02:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy