Sponsored Content
Top Forums Shell Programming and Scripting Append to exisiting file on same line. Post 302377061 by Franklin52 on Thursday 3rd of December 2009 03:38:49 AM
Old 12-03-2009
Should be:

Code:
awk '{print $0 "another text"}' file > newfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Large file need to append to each line

I have a few large files that need to have a ,A appended to the end of each record. I though about using sed but never used it before and the man is not intuitive nor have I found examples. This is what I tried for file name bob sed '\a,A' bob from what I get if you do not supply a range... (1 Reply)
Discussion started by: r1500
1 Replies

2. UNIX for Dummies Questions & Answers

How to Append a Value to each line of the file

Hi, We have Multiple source files which has some data, I need a K shell script which will append number '1' as the last character to all the lines of the first file and then increments the value and appends '2' to all the lines to the next file and so on. For Example Incoming file 1 ... (11 Replies)
Discussion started by: dsshishya
11 Replies

3. Shell Programming and Scripting

Append each line to next previous line in a file

Hi all, Please help me in providing sample code to append the following 4 lines in one row. Input : A1/EXT "BAPBSC10/07B/00" 523 090530 0115 RXOCF-430 HY1711 1 EXTERNAL ALARM DOOR ALARM Output should be : A1/EXT "BAPBSC10/07B/00" 523 090530 0115 ... (8 Replies)
Discussion started by: sudhakaryadav
8 Replies

4. Shell Programming and Scripting

shell script to read a line in gps receiver log file and append that line to new file

Hi, I have gps receiver log..its giving readings .like below Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GPSD,R=1 $GPGSV,3,1,11,08,16,328,40,11,36,127,00,28,33,283,39,20,11,165,00*71... (3 Replies)
Discussion started by: gudivada213
3 Replies

5. Shell Programming and Scripting

append a line into a file in the top

hi, My code is #!/bin/sh echo "\n\nPlease enter the month of the year(YYYYMM) : \c" read date_rep INPUT_L9_FILE=L9_Recharge_Description_EOM_$date_rep.csv #This part is used to summarise Grand_Total, Balance_Total of file L9_Recharge_Description_EOM_${1}.csv. awk -F"," '{if(NR!=1)... (5 Replies)
Discussion started by: madfox
5 Replies

6. Shell Programming and Scripting

How to append text to the second line of a file

Say I have a text file like: 1 3 4 How would I use ksh to put the number '2' into the second line of that file? I'm using OpenBSD so the sed syntax might be a bit different (I have no idea how to use sed, though) (4 Replies)
Discussion started by: guitarscn
4 Replies

7. Shell Programming and Scripting

Append string to first line of a file

Hi, Please suggest me to write unix command, HEADER20110101 string append to first line of a file.. Regards Akshu (3 Replies)
Discussion started by: akshu.agni
3 Replies

8. Shell Programming and Scripting

conditional append one line in file.

Hi, Unix gurus, I have a requirement as following: checking existing file, if the file only contain one line. then append "No data" else keep existing file as is. can i achieve this by in command line without write a script. :wall: Thanks in advance. (4 Replies)
Discussion started by: ken002
4 Replies

9. Shell Programming and Scripting

Append file name to the beginning of each line

I want to append file names at the beginning of a line for each row file content abc.txt.gz 123|654|987 bcd.txt.gz 876|trf|kjh I want a single output file with below format abc.txt.gz|123|654|987 bcd.txt.gz|876|trf|kjh This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies

10. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

hi all, i had the below script x=`cat input.txt |wc -1` awk 'NR>1 && NR<'$x' ' input.txt > output.txt by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
VOS_LISTADDRS(1)					       AFS Command Reference						  VOS_LISTADDRS(1)

NAME
vos_listaddrs - Displays all VLDB server entries SYNOPSIS
vos listaddrs [-uuid <uuid of server>] [-host <address of host>] [-printuuid] [-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt] [-noresolve] [-help] vos lista [-u <uuid of server>] >>> [-h <address of host>] [-p] [-c <cell name>] [-noa] [-l] [-v] [-e] [-nor] [-he] DESCRIPTION
The vos listaddrs command displays all of the server entries from the Volume Location Database (VLDB). An entry is created as the File Server initializes and registers the contents of its /var/lib/openafs/local/sysid file in the VLDB. OPTIONS
-host <address of host> Rather than displaying all the server entries, display only server entries for the specified host. This will show all multihomed addresses registered by that File Server in the VLDB. -uuid <uuid of server> Rather than displaying all the server entries, display only server entries for the File Server with the specified UUID. This will show all multihomed addresses registered by that File Server in the VLDB and also allows mapping a File Server UUID to its address. -printuuid Prints the UUID of server entries in addition to the registered addresses. The -printuuid option is available in OpenAFS versions 1.4.5 or later and 1.5.8 or later. -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see vos(1). -noauth Assigns the unprivileged identity anonymous to the issuer. Do not combine this flag with the -localauth flag. For more details, see vos(1). -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The vos command interpreter presents it to the Volume Server and Volume Location Server during mutual authentication. Do not combine this flag with the -cell argument or -noauth flag. For more details, see vos(1). -verbose Produces on the standard output stream a detailed trace of the command's execution. If this argument is omitted, only warnings and error messages appear. -encrypt Encrypts the command so that the operation's results are not transmitted across the network in clear text. This option is available in OpenAFS versions 1.4.11 or later and 1.5.60 or later. -noresolve Shows all servers as IP addresses instead of the DNS name. This is very useful when the server address is registered as 127.0.0.1 or when dealing with multi-homed servers. This option is available in OpenAFS versions 1.4.8 or later and 1.5.35 or later. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output displays all server entries from the VLDB, each on its own line. If a file server machine is multihomed, all of its registered addresses appear on the line. The first one is the one reported as a volume's site in the output from the vos examine and vos listvldb commands. The VLDB records IP addresses, and the command interpreter has the local name service (either a process like the Domain Name Service or a local host table) translate them to hostnames before displaying them. If an IP address appears in the output, it is not possible to translate it. The existence of an entry does not necessarily indicate that the machine that is still an active file server machine. To remove obsolete server entries, use the vos changeaddr command with the -remove argument. EXAMPLES
The following command displays the VLDB server entries in the ABC Corporation cell: % vos listaddrs sv5.abc.com sv1.abc.com sv2.abc.com afs2.abc.com sv6.abc.com The following command displays the VLDB server entry and UUID for host sv5.abc.com in the ABC Corporation cell: % vos listaddrs -p -ho sv5.abc.com UUID: 000c5aff-8246-1699-96-c4-437b5a45aa77 sv5.abc.com PRIVILEGE REQUIRED
None SEE ALSO
fs_uuid(1), sysid(5), vos(1), vos_changeaddr(1), vos_examine(1), vos_listvldb(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 VOS_LISTADDRS(1)
All times are GMT -4. The time now is 10:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy