Hi all,
I have a 10.txt file. In this file 2 words are present by name Active and Inactive and these words are repeated 7000 times. I want to take the unique 2 words from this 7000 lines.
Thanks
Mahalakshmi.A (3 Replies)
Hi,
I have a file like this:
Some_String_Here 123 123 123 321 321 321 3432 3221 557 886 321 321
I would like to find only the unique values in the files and get the following output:
Some_String_Here 123 321 3432 3221 557 886
I am trying to get this done using awk. Can someone please... (5 Replies)
I need to grep for a pattern in a file. Files are huge and have several repeated occurances of the strings which match pattern. I just need the strings which contain the pattern in the output.
For eg.
The contents of my file are as follows. The pattern I want to match by is ABCD
... (5 Replies)
Dear Folks,
I want to calculate the elapsed hours between two time columns. I am using timestampdiff method for the same. I am able to get the value. But facing an issue of decimal values. For example the elapsed hours between 09:00:00 and 20:30:00 is coming as 11 instead of 11.5. I am using below... (1 Reply)
Hi, I am working with files containing 2 columns in which i need to come up with the frequency/count of values in col. 2 falling within specifics binned values of col. 1. the contents of a sample file is shown below:
15 12.5
15 11.2
16 0.2
16 1.4
17 1.6
18 4.5
17 5.6
12 8.6
11 7.2
9 ... (13 Replies)
I have a file containing data like so:
2012-01-02 GREEN 4
2012-01-02 GREEN 6
2012-01-02 GREEN 7
2012-01-02 BLUE 4
2012-01-02 BLUE 3
2012-01-02 GREEN 4
2012-01-02 RED 4
2012-01-02 RED 8
2012-01-02 GREEN 4
2012-01-02 YELLOW 5
2012-01-02 YELLOW 2
I can't always predict what the... (4 Replies)
Hallo Everyone.
I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text.
I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern>
... (5 Replies)
how to display the unique strings in two files using shell script or commands.
I tried diff and cmp but it shows the entire line, i need only the mismatched strings.
File1:
sat,sun,mon,tue
rose,lilly,lotus
white,red,blue,green,pink
File2:
sat,sun,mon,tue
rose,sunflower,lotus... (4 Replies)
Hello All,
I am trying to write a script which returns me clientID,programId,userID indicated in bold from the below log files.Log file is having many such data , iam just presenting sample .
Sample Log file.
hostname 1525867288264 UA:MP:EP491418 http-nio-8080-exec-11 ERROR Get Price... (13 Replies)
Discussion started by: nextStep
13 Replies
LEARN ABOUT DEBIAN
knife-data-bag
KNIFE-DATA-BAG(1) Chef Manual KNIFE-DATA-BAG(1)NAME
knife-data-bag - Store arbitrary data on a Chef Server
SYNOPSIS
knife data bag sub-command (options)
DESCRIPTION
Data bags are stores of arbitrary JSON data. Each data bag is a collection that may contain many items. Data Bag Items are indexed by the
Chef Server and can be searched via knife-search(1).
Data bags are available to all nodes configured by chef-client(8), and are therefore a convenient mechanism to store global information,
such as lists of administrative accounts that should be configured on all hosts.
DATA BAG SUB-COMMANDSCREATE
knife data bag create bag name [item id] (options)
-s, --secret SECRET
A secret key used to encrypt the data bag item. See encryption support below.
--secret-file SECRET_FILE
The path to a file containing the secret key to be used to encrypt the data bag item.
If item id is given, creates a new, empty data bag item and opens it for editing in your editor. The data bag will be created if it does
not exist.
If item id is not given, the data bag will be created.
DELETE
knife data bag delete bag name [item id] (options)
Delete a data bag, or an item from a data bag.
EDIT
knife data bag edit bag name item id (options)
-s, --secret SECRET
A secret key used to encrypt the data bag item. See encryption support below.
--secret-file SECRET_FILE
The path to a file containing the secret key to be used to encrypt the data bag item.
Edit an item in a data bag.
FROM FILE
knife data bag from file bag name file (options)
knife data bag from file bag name file1 file2 file3 (options)
knife data bag from file bag name folder (options)
-s, --secret SECRET
A secret key used to encrypt the data bag item. See encryption support below.
--secret-file SECRET_FILE
The path to a file containing the secret key to be used to encrypt the data bag item.
Load a data bag item from a JSON file. If file is a relative or absolute path to the file, that file will be used. Otherwise, the file
parameter is treated as the base name of a data bag file in a Chef repository, and knife will search for the file in
./data_bags/bag_name/file. For example knife data bag from file users dan.json would attempt to load the file ./data_bags/users/dan.json.
LIST
knife data bag list (options)
-w, --with-uri
Show corresponding URIs
Lists the data bags that exist on the Chef Server.
SHOW
knife data bag show BAG [ITEM] (options)
-s, --secret SECRET
A secret key used to encrypt the data bag item. See encryption support below.
--secret-file SECRET_FILE
The path to a file containing the secret key to be used to encrypt the data bag item.
Show a specific data bag or an item in a data bag. The output will be formatted according to the --format option.
ENCRYPTION SUPPORT
Data Bag Items may be encrypted to keep their contents secret. This may be desireable when storing sensitive information such as database
passwords, API keys, etc.
Data Bag Item encryption uses the AES-256 CBC symmetric key algorithm.
CAVEATS: Keys are not encrypted; only values are encrypted. The "id" of a Data Bag Item is not encrypted, since it is used by Chef Server
to store the item in its database. For example, given the following data bag item:
{"id": "important_passwords", "secret_password": "opensesame"}
The key "secret_password" will be visible to an evesdropper, but the value "opensesame" will be protected. Both the key "id" and its value
"important_passwords" will be visible to an evesdropper.
Chef Server does not provide a secure mechanism for distributing encryption keys.
SEE ALSO knife-search(1)AUTHOR
Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.
DOCUMENTATION
This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this docu-
ment under the terms of the Apache 2.0 License.
CHEF
Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home
Chef 10.12.0 June 2012 KNIFE-DATA-BAG(1)