Sponsored Content
Top Forums Shell Programming and Scripting awk - why this is not working? trying next word! Post 302901445 by rveri on Tuesday 13th of May 2014 07:40:14 PM
Old 05-13-2014
So how do I get the above output, do I have to store in an array first. Thank you ..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep for word not working

Hi All..I need a help i am trying to find a word using below script whereas the word exists in my file nitin.txt as a directory but still i am getting "word not found" output..Your suggestions welcomed.: #to check for existence of nitin #!/bin/bash cd /apps/uat1/deploy/app ls -lrt >... (4 Replies)
Discussion started by: nattynitin
4 Replies

2. UNIX for Advanced & Expert Users

Awk expressions working & not working

Hi, Putting across a few awk expressions. Apart from the last, all of them are working. echo a/b/c | awk -F'/b/c$' '{print $1}' a echo a/b/c++ | awk -F'/b/c++' '{print $1}' a echo a/b/c++ | awk -F'/b/c++$' '{print $1}' a/b/c++ Request thoughts on why putting a '$' post double ++... (12 Replies)
Discussion started by: vibhor_agarwali
12 Replies

3. Shell Programming and Scripting

Awk for last word

Hi I am writing a script using nano and I'm asking the user for their full name, I then store this in a variable but I only want to display the last word that they input. Any idea on how I would do this using awk. I am not using sed, just using a script. So far I have got this... echo "What... (1 Reply)
Discussion started by: Addman1991
1 Replies

4. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

5. Shell Programming and Scripting

sed working as uniq 1st word only

Hello, everyone. I am having trouble figuring out sed command which emulates uniq. The task I want to do is that 2 consecutive lines in file should be considered the same using the first word only. Example: cat tmp.txt ddd eee aaa bbb ccc ddd eee fff asd fdd asd fdd bbb aaa bbb asd fgh... (4 Replies)
Discussion started by: motorcek
4 Replies

6. Shell Programming and Scripting

How to get the exact word in awk?

Hi, i have a file that contains the following: ARTPRD01_app = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 11.222.3.4)(PORT = 1540)) (CONNECT_DATA = (SERVICE_NAME = artprd01.com) ARTPRD01 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 11.223.3.1)(PORT =... (2 Replies)
Discussion started by: reignangel2003
2 Replies

7. Shell Programming and Scripting

Awk: System command not working in awk

Hi, I have around 10 files in a folder in which I want to change the file format from tab(\t) to pipe(|) with some changes in the fields as well. Below is the code, while tmp file is getting generated but move command is not working, please help Following is the code awk -F"\t" '{print... (2 Replies)
Discussion started by: siramitsharma
2 Replies

8. Shell Programming and Scripting

awk word boundaries not working

Hi, I am trying below code but the word boundaries not seem to be working. What am I doing incorrectly? echo " ECHO " | awk '{ q="ECHO" ; if ( $0 ~ /\bq\b/) print "HELLO" ; }' OR echo " ECHO " | awk '{ q="ECHO" ; if ( $0 ~ /\b'$q'\b/) print "HELLO" ; }' Or echo " ECHO " | awk... (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies

9. Shell Programming and Scripting

How do i replace a word ending with "key" using awk excpet for one word?

echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} | awk 'gsub(/^|abc,|$/,"") {print}' Required output {grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies

10. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
semanage_bool(3)					   Libsemanage API documentation					  semanage_bool(3)

NAME
semanage_bool - SELinux Policy Booleans Management API SYNOPSIS
#include <semanage/boolean_record.h> #include <semanage/booleans_active.h> #include <semanage/booleans_policy.h> #include <semanage/booleans_local.h> This object contains properties associated with a SELinux policy boolean For details on a specific function, see its manual page. Record API Overview semanage_bool_create(3)- create a boolean semanage_bool_free(3)- release resources for this boolean semanage_bool_key_create(3)- create a key, which can be used to identify a boolean semanage_bool_key_free(3)- release resources for this boolean key semanage_bool_key_extract(3)- create a key matching this boolean semanage_bool_clone(3)- create an identical boolean (deep-copy clone) semanage_bool_compare(3)- compare this boolean to the provided key semanage_bool_compare2(3)- compare this boolean to another Properties API Overview semanage_bool_get_name(3)- return the name of this boolean semanage_bool_set_name(3)- set the name of this boolean semanage_bool_get_value(3)- return the value of this boolean semanage_bool_set_value(3)- set the value of this boolean Record Store API Overview semanage_bool_modify_local(3)- add or update a boolean in the local store semanage_bool_set_active(3)- update a boolean in the currently active policy semanage_bool_del_local(3)- delete a boolean from the local store semanage_bool_exists(3)- check if a boolean is defined in the persistent policy semanage_bool_exists_local(3)- check if a boolean is defined in the local store semanage_bool_exists_active(3)- check if a boolean is defined in the currently active policy semanage_bool_query(3)- query a boolean in the persistent policy semanage_bool_query_local(3)- query a boolean in the local store semanage_bool_query_active(3)- query a boolean in the currently active policy semanage_bool_count(3)- count the number of booleans defined in the persistent policy semanage_bool_count_local(3)- count the number of booleans defined in the local store semanage_bool_count_active(3)- count the number of booleans defined in the currently active policy semanage_bool_iterate(3)- execute a callback for each boolean in the persistent policy semanage_bool_iterate_local(3)- execute a callback for each boolean in the local store semanage_bool_iterate_active(3)- execute a callback for each boolean in the currently active policy semanage_bool_list(3)- return an array containing all booleans in the persistent policy semanage_bool_list_local(3)- return an array containing all booleans in the local store semanage_bool_list_active(3)- return an array containing all booleans in the currently active policy ivg2@cornell.edu 16 March 2006 semanage_bool(3)
All times are GMT -4. The time now is 11:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy