Sponsored Content
Top Forums Shell Programming and Scripting Append Second Row to First Row @ end in a file Post 302381376 by Scrutinizer on Friday 18th of December 2009 03:05:02 AM
Old 12-18-2009
Without a space:
Code:
sed 'N;s/\n//' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

2. Shell Programming and Scripting

Get a group of line from different file and put them into one file row by row

hi guys, today i'm stuck in a new problem. the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example. I have different html files and each of them have a consecutive lines group inside that i want to extract. example: ... (8 Replies)
Discussion started by: sbobotex
8 Replies

3. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

4. Shell Programming and Scripting

Append data to new row in CSV file every day

Hi All I will run the same script every day in corn and output should go to same CSV file but in different row with dates on it. Below is my example in attached format. Script i am using to collect switch port online DATE=`date '+%d-%m-%y'` for f in `cat... (1 Reply)
Discussion started by: ranjancom2000
1 Replies

5. UNIX for Dummies Questions & Answers

append column and row header to a file in awk script.

Hi! Is there a way to append column and row header to a file in awk script. For example if I have Jane F 39 manager Carlos M 40 system administrator Sam F 20 programmer and I want it to be # name gend age occup 1 Jane F 39 manager 2 Carlos M ... (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies

6. Shell Programming and Scripting

Read row number from 1 file and print that row of second file

Hi. How can I read row number from one file and print that corresponding record present at that row in another file. eg file1 1 3 5 7 9 file2 11111 22222 33333 44444 55555 66666 77777 88888 99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies

7. Shell Programming and Scripting

Search row by row from one file to another file if match is found print few colums of file 2

this is the requirement list.txt table1 table2 table3 testfile.txt name#place#data#select * from table1 name2#place2#data2#select * from table 10 innerjoin table3 name2#place2#data2#select * from table 10 output name place table1 name2 place table3 i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies

8. Shell Programming and Scripting

Read line from the file and append it to each row

Hi All, We have a file in the following format: 0.010000 $ ITI 11 LV2 $ 40456211 $ 0.135000 $ ITI 11 LV1 $ 40512211 $ 1.215600 $ ITI 11 ITI3 $ 41406211 $ 24/05/2014 14:05:02 0.030000 $ ITI 11 LV2 $ 40456211 $ ... (3 Replies)
Discussion started by: gauravsinghal79
3 Replies

9. Shell Programming and Scripting

Split a file by start and end row.

I have a file which looks something as following, I would like to split to several files, The start and end of each file is 'FILE' and end with 'ASCII... ' . At the same time for each file in the first column add 100 and also second column add 100 the rest of the column as it is , see example of... (2 Replies)
Discussion started by: tk2000
2 Replies

10. Shell Programming and Scripting

Add Row from First Row (Split Row)

HI Guys, I have Below Input :- RepigA_hteis522 ReptCfiEtrBsCll_aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 RepigA ReptCfiEtrBsCll hteis522 aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies
snmpa_local_db(3erl)					     Erlang Module Definition					      snmpa_local_db(3erl)

NAME
snmpa_local_db - The SNMP built-in database DESCRIPTION
The module snmpa_local_db contains functions for implementing tables (and variables) using the SNMP built-in database. The database exists in two instances, one volatile and one persistent. The volatile database is implemented with ets. The persistent database is implemented with dets. There is a scaling problem with this database. * Insertions and deletions are inefficient for large tables. This problem is best solved by using Mnesia instead. The following functions describe the interface to snmpa_local_db . Each function has a Mnesia equivalent. The argument NameDb is a tuple {Name, Db} where Name is the symbolic name of the managed object (as defined in the MIB), and Db is either volatile or persistent . mnesia is not possible since all these functions are snmpa_local_db specific. COMMON DATA TYPES
In the functions defined below, the following types are used: * NameDb = {Name, Db} * Name = atom(), Db = volatile | persistent * RowIndex = [int()] * Cols = [Col] | [{Col, Value}], Col = int(), Value = term() where RowIndex denotes the last part of the OID, that specifies the index of the row in the table. Cols is a list of column numbers in case of a get operation, and a list of column numbers and values in case of a set operation. EXPORTS
dump() -> ok | {error, Reason} Types Reason = term() This function can be used to manually dump the database to file. match(NameDb, Pattern) Performs an ets/dets matching on the table. See Stdlib documentation, module ets, for a description of Pattern and the return val- ues. print() print(TableName) print(TableName, Db) Types TableName = atom() Prints the contents of the database on screen. This is useful for debugging since the STANDARD-MIB and OTP-SNMPEA-MIB (and maybe your own MIBs) are stored in snmpa_local_db . TableName is an atom for a table in the database. When no name is supplied, the whole database is shown. table_create(NameDb) -> bool() Creates a table. If the table already exist, the old copy is destroyed. Returns false if the NameDb argument is incorrectly specified, true otherwise. table_create_row(NameDb, RowIndex, Row) -> bool() Types Row = {Val1, Val2, ..., ValN} Val1 = Val2 = ... = ValN = term() Creates a row in a table. Row is a tuple with values for all columns, including the index columns. table_delete(NameDb) -> void() Deletes a table. table_delete_row(NameDb, RowIndex) -> bool() Deletes the row in the table. table_exists(NameDb) -> bool() Checks if a table exists. table_get_row(NameDb, RowIndex) -> Row | undefined Types Row = {Val1, Val2, ..., ValN} Val1 = Val2 = ... = ValN = term() Row is a tuple with values for all columns, including the index columns. SEE ALSO
ets(3erl), dets(3erl), snmp_generic(3erl) Ericsson AB snmp 4.19 snmpa_local_db(3erl)
All times are GMT -4. The time now is 05:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy