Sponsored Content
Top Forums Shell Programming and Scripting Add to constant fields at the end of every line Post 302407605 by kurumi on Friday 26th of March 2010 12:20:16 AM
Old 03-26-2010
Code:
sed 's/$/1000,XYZ-1234/' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add a new end of line

Hi, Does anyone know if its possible to add something like an end of line like c or java in unix? dirs=/home/nosnam var='' for dir in $dirs do listDirs=`ls -d1 $dir/*` for eachList in $listDirs do listRepos=`du -ks $eachList | awk '{ x+=$1 }; END { print x... (4 Replies)
Discussion started by: nosnam
4 Replies

2. Shell Programming and Scripting

Append tabs at the end of each line in NAWK -- varying fields

Hi, I need some help in knowing how I can append tabs at the end of each line... The data looks something like this: field1, field2, field3, field4 1 2 3 4 5 I have values in field1 and field 2 in the first row and I would like to append tab on field3 and field4 for the first row..and in... (6 Replies)
Discussion started by: madhunk
6 Replies

3. UNIX for Advanced & Expert Users

Add line numbers to end of each line

Hi i would like to add line numbers to end of each line in a file. I am able to do it in the front of each line using sed, but not able to add at the end of the file. Can anyone suggest The following code adds line number to start of each line sed = filename | sed 'N;s/\n/\t/' how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies

4. Shell Programming and Scripting

how to add ; at the end of last line

hi, i have file which is having large sql query eg : i am executing this sql file but now i want to add ; after query on same line i.e. i should look like any idea how to achieve it ? (6 Replies)
Discussion started by: crackthehit007
6 Replies

5. Shell Programming and Scripting

Get the 1st 99 characters and add new line feed at the end of the line

I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed). AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies

6. Shell Programming and Scripting

Add string end of line

Hello How can I add a string (always the same) at the end of a specific line in a file... The file is: 000000001 041 L $$aspa 000000001 088 L $$aJ.E.N. 551 000000001 090 L $$aINFORMES JEN 000000001 100 L $$aautor 1 ---- 000000002 041 L $$aeng 000000002 088 L $$aJ.E.N. 1... (13 Replies)
Discussion started by: ldiaz2106
13 Replies

7. Shell Programming and Scripting

Add line at the end

How to add a comma at the end of each line in this file?30 1412 30 3352 30 5254 30 5543 30 7478 3 28 3 30 3 39 3 54 3 108 3 152 3 178 3 182 3 214 3 271 3 286 3 300 3 348 3 349 3 371 (3 Replies)
Discussion started by: gunjan
3 Replies

8. Shell Programming and Scripting

Counting fields backwards from end of line

Hello, file.dat 1,2,3,4,5,6,7,8 1,2,3,4,5,6 1,2,3,4 I need to output the value in the third column from the end: 6 4 2 Thanks! (2 Replies)
Discussion started by: palex
2 Replies

9. Shell Programming and Scripting

Add a new field at the end of each line

i want to add a white-space at the end of each line for my inp.file, but when i do it, the result is a new line with a white-space between each line! my input: 2012 0811 1223 15.2 L 38.393 46.806 9.0 Teh 78 0.5 6.5LTeh 1 GAP=74 ... (5 Replies)
Discussion started by: saeed.soltani
5 Replies

10. Shell Programming and Scripting

Add text to the end of line

Seems simple but ive been searching for a good hour of so I have a text file and would like to add a string to the end of line 5 ( as an example) to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append any ideas on how this could... (2 Replies)
Discussion started by: dunryc
2 Replies
WMWORK(1)							   Version 0.2.5							 WMWORK(1)

NAME
wmwork - keep track of time worked on projects SYNOPSIS
wmwork [options] DESCRIPTION
wmwork provides a monitor on a 64x64 mini window that helps you keeping track of your time. The idea is based on the program Worklog writ- ten by Truxton King Fulton II. In contrast to Worklog wmwork is a graphical application designed to work with the WindowMaker dock, but will work with other window managers as well. OPTIONS
-d, --days displays time in ddd.hh:mm instead of hhh:mm:ss. Note that if one timer is at least 1000 hours large this will be the case anyway. -f, --force overwrite stale lock files. Use this if wmwork says that it's already running but it isn't. -h, --help display a command line summary. -v, --version display the version number. --display=id set the display to use, e.g. --display=:0.0. --geometry=pos set the position of the dock app, e.g. --geometry=+10+10. Note that the size (64x64) is hard-coded and cannot be changed. USAGE
When wmwork is started, the uppermost line shows the accumulated time spent on the project, identified by a three letter code in the third line. The second line shows the current time spent on the project and is initially zero. The button V starts the timer, the button || pauses it. The button X stops the timer, saving the accumulated time in ~/.wmwork/worklog, adding the current session time to ~/.wmwork/worklog.XYZ and resetting the latter. The buttons < and > switch between the projects found in the file ~/.wmwork/worklog. This can be done only if the timer is neither running nor paused. FILES
~/.wmwork/worklog contains the projects configuration and log summaries. Each line has the form identifier:timestamp[:comment]. Empty lines and lines beginning with a # are ignored. Only the first three charac- ters of the (case-insensitive) identifier are relevant. When wmwork is overwriting ~/.wmwork/worklog it cuts the identifiers down that way. ~/.wmwork/??? contains human readable timestamps for the project XYZ, where XYZ is the truncated identifier from ~/.wmwork/worklog. Having multiple entries of the same identifier in ~/.wmwork/worklog is possible. They are counted independently, but will share the same project file. BUGS
Please send any bugs to <martin@godisch.de>. Debian users are encouraged to use the Debian Bug Tracking System <http://bugs.debian.org/wmwork>. AUTHOR
wmwork was written by Martin A. Godisch <martin@godisch.de>. It is based on the program wmppp written by Martijn Pieterse and Antoine Nulle. Thanks to the following people, who have contributed to wmwork: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Gordon Fraser <gordon@freakzone.net> Daniel Tschan <tschan@devzone.ch> Alexey Dokuchaev <danfe@danfe.ru> Josep Portella Florit <jpf@sdf.lonestar.org> Ben Stern <ben.stern@gmail.com> The Debian Project January 2005 WMWORK(1)
All times are GMT -4. The time now is 12:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy