Sponsored Content
Top Forums Shell Programming and Scripting Print new item in file with symbol Post 302457341 by branred on Monday 27th of September 2010 09:05:40 PM
Old 09-27-2010
Thank you so much for the advice.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get string from file after nth symbol

I've got a file, where I want to grab two fields from it. The file isn't fixed format, so all I know is that the two fields are after a certain number of delimiters within the record. File e.g. as follows:- "1"^"HEADER"^ "5"^"12345678"^"Smith"^"Dave"^"Mr"^"Research &... (1 Reply)
Discussion started by: daveaasmith
1 Replies

2. Shell Programming and Scripting

Remove the comment symbol ' from a file.

I want to remove the commented lines in a file identified by ' symbol at the start of each ine. A sample example will be like: Input ----- 'IFerr_flag=0THEN iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then Output -------... (3 Replies)
Discussion started by: joyan321
3 Replies

3. Shell Programming and Scripting

Searching for file and stopping at first item found

Hello, I try to write a shell script that would list all files on a directory and stop when it finds the first item specified on a find or ls command. How can I tell to the find or ls command to stop when it finds the first ".doc" file for example ? Thank you (7 Replies)
Discussion started by: davchris
7 Replies

4. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

5. Shell Programming and Scripting

Reading each item from a formatted file

Hi, I have a file generated like this - 1. Fire SQL and store the formatted output in a temp file echo "select path, empid, age from emp_tbl" | /usr/sql emp_db 2 > count_file | grep vol > tempFile 2. The tempFile looks like this after the above statement /vol/emp1 0732 ... (9 Replies)
Discussion started by: angshuman_ag
9 Replies

6. Shell Programming and Scripting

awk to start with symbol and print next

File A >answer is the predicted other than >bigger than two >whatever isthere >out of mind CGAHHAWWASSASS SASAWEDSASSDDD SSDDDEDEUJUYYS >hello you are there other is what is that>you are not serious>leave it SSSAAAAAASS ASWWQQDDD WESEEWWWW WEEEEEWSS SJUJSGKKSSS SWBVHJJWUW >hi i... (3 Replies)
Discussion started by: cdfd123
3 Replies

7. Programming

Storing C++-struct in file - problem when adding new item in struct

Hi, I have received an application that stores some properties in a file. The existing struct looks like this: struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost; //defined in Sshconfig UINT iPortNr; TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies

8. Shell Programming and Scripting

Read a lis, find items in a file from the list, change each item

Hello, I have some tab delimited text data, file: final_temp1 aname val NAME;r'(1,) 3.28584 r'(2,)<tab> NAME;r'(3,) 6.13003 NAME;r'(4,) 4.18037 r'(5,)<tab> You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

9. UNIX for Beginners Questions & Answers

Zabbix item for last line of a log file

Dear all,Zabbix version : 2.4 (yes, I know, upgrading soon - honest) Server OS version : CentOS 6, 64-bit (CentOS 7 with the Zabbix upgrade)I've got a large log file that I would like to read by an external process. It's basically the same as reading the item value on a web-page. I have... (5 Replies)
Discussion started by: rbatte1
5 Replies

10. Shell Programming and Scripting

Script to process a list of items and uncomment lines with that item in a second file

Hello, I have a src code file where I need to uncomment many lines. The lines I need to uncomment look like, C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ) The comment is the "C" in the first column. This needs to be deleted so that there are 6 spaces preceding "CALL".... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
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-COMMANDS CREATE
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)
All times are GMT -4. The time now is 06:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy