Sponsored Content
Top Forums Shell Programming and Scripting copying to the end of the line Post 302556596 by legolad on Monday 19th of September 2011 07:16:22 AM
Old 09-19-2011
thanks alot the awk one worked a dream Smilie

great work
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

copying from line N1 to line N2 of a file in a series of files

Dear community, I'm quite a newbie with scripting, I have this problem: I have a file with many lines and I want to copy the lines from 1 to N to file.1, from N+1 to 2N to file.2, and so on up to the end of the file I have tried with something like this (N=43 in this example): awk '{for... (2 Replies)
Discussion started by: paolalup
2 Replies

2. Shell Programming and Scripting

Copying x words from end of line to specific location in same line

Hello all i know it is pretty hard one but you will manage it all after noticing and calculating i find a rhythm for the file i want to edit to copy the last 12 characters in line but the problem is to add after first 25 characters in same line in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies

3. 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

4. Programming

concatinate all lines from second line to end of line in perl

I have datafile like ~dta.yunm shhshsgggssssjsksjs sggsjshsjsjssss shshshhshshshs i wish to take only first line and all other lines in concatenated form in second line what should I do??? output like ~dta.yunm shhshsgggssssjsksjssggsjshsjsjssssshshshhshshshs please tell me how... (7 Replies)
Discussion started by: sujit_singh
7 Replies

5. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

6. UNIX for Dummies Questions & Answers

How to specify beginning-of-line/end-of-line characters inside a regex range

How can I specify special meaning characters like ^ or $ inside a regex range. e.g Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character. I tried the following but it does not work: sed 's/\(\)/<do something here>/g' file1 ... (3 Replies)
Discussion started by: jawsnnn
3 Replies

7. UNIX for Dummies Questions & Answers

vim copy line and paste at the beginning, middle, and end of another line

How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies

8. Shell Programming and Scripting

How to set end limit while copying files of a range??

I have files being generated in format A20140326.00........ to A20140326.24............. I need to copy these hourly basis from one location to another. Eg. If i copy from 14 to 19 the hour, I use wildcard as A201403226.1*. Requirement is : I need to copy from 06 hour and wil run the script... (1 Reply)
Discussion started by: Saidul
1 Replies

9. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
INNDF(8)						      System Manager's Manual							  INNDF(8)

NAME
inndf - Replacement for 'df | awk' in innwatch.ctl SYNOPSIS
inndf [ -i ] filesystem(s) | [ -n ] [ -o ] DESCRIPTION
Inndf is a replacement for 'df | awk' in innwatch.ctl(5) or used in innstat(8). Inndf reports free Kilobytes (not disk blocks) or free inodes. Kilobytes in this case means 1024 bytes. If arguments are multiply specified, the output includes multiple lines which shows each specified argument and the value. This is used by innstat(8). Inndf doesn't sync, forks less, is less complicated, etc. If <enableoverview in inn.conf> is set to ``true'' and other overview settings are already done, inndf can also show the usage of overview space or the number of stored data. OPTIONS
-i If the ``-i'' flag is used, then the number of free inodes are reported instead of the number of free Kilobytes. -n If the ``-n'' flag is used, then total number of stored overview data is reported. The number counts different data even if article is crossposted. -o If the ``-o'' flag is used, then overview space usage are reported as percentage. ``-o'' cannot be always available. This can be available for ``buffindexed'' ovmethod currently. HISTORY
Inndf was written by Ian Dickinson <idickins@fore.com>. The initial manual page was written by Swa Frantzen <Swa.Frantzen@Belgium.EU.net>. Thanks also to the following folks for ports, patches and comments: Mahesh Ramachandran <rr@eel.ufl.edu>, Chuck Swiger <chuck@its.com>, Sang-yong Suh <sysuh@kigam.re.kr>, Brad Dickey <bdickey@haverford.edu>, Taso N. Devetzis <devetzis@snet.net>, Wei-Yeh Lee <weiyeh@colum- bia.edu>, Jeff Garzik <jeff.garzik@spinne.com>, and to all the other folks I met and worked with during my 10 years as a newsadmin. SEE ALSO
innwatch.ctl(5). INNDF(8)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy