Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Replace character in odd or even lines Post 302970733 by emare on Monday 11th of April 2016 11:52:24 AM
Old 04-11-2016
Holy cow ! How can I be so .......Smilie

Thanks a lot !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace a perticular character of all lines of a file

Hi all, I am new to UNIX, so sorry if my question seem stupid to u. well i want to replace the first character of first 30 lines of a file, only if the first character is h. and in anothe script i want to replace a particular string/character say hello/h of a file.Condition: It should... (1 Reply)
Discussion started by: abovais
1 Replies

2. UNIX for Dummies Questions & Answers

odd character (^M) from .sh when chagining to .ksh

// AIX 5.3 I am trying to use .sh after changing it to .ksh Obviously, it doesn't like the file extension change. I am seeing a lot of odd characters (^M) like below: Init_Part2 ()^M^M {^M^M AWTRACE "AW SET"^M^M set | grep -e CFG_ -e OUTDIR_ENV^M^M AWTRACE "AW SET"^M^M ^M^M if ;... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

3. UNIX for Dummies Questions & Answers

Odd Control Character issue ^A

Sorry to bug you, but my sed is failing me, I have a file auto generated from abinitio, it has a string of chars ending with a line break, and then it has added a ^A character, I can remove this is vi by using the following %s/^A//g (where ^A is ctrl v and control A), however when I try to sed... (1 Reply)
Discussion started by: badg3r
1 Replies

4. Shell Programming and Scripting

print ODD lines

i want to print ODD lines like first ,third then fifth and so on 234,567,ABC,KJL 234,565,ABD,KJL 234,568,ABE,KJL 234,560,ABF,KJL 234,563,ABG,KJL 234,562,ABH,KJL O/P will be like 234,567,ABC,KJL ----->first liine 234,568,ABE,KJL ----->third line 234,563,ABG,KJL ----->fifth line... (6 Replies)
Discussion started by: aaysa123
6 Replies

5. Shell Programming and Scripting

replace/delete odd occurance

how to delete/replace the the odd occurance of a pattern say newline character "\n" a,b,c,d e,f g, h, i, j, k, l m,n 1, 2, 3, 4, 5, 6 1, 3, 4, 5, 6, 7 the output should be a,b,c,de,f g, h, i, j, k, lm,n 1, 2, 3, 4,5, 6 1, 3, 4, 5, 6, 7 (4 Replies)
Discussion started by: ratheeshjulk
4 Replies

6. Shell Programming and Scripting

How to search for pattern in odd lines?

Hi friends, I am looking for sed command/script that would search for a given fixed pattern on odd lines and then if it matches, prints the matching pattern and the next line. For example, in the example below, i am looking for pattern 0 and 1011 on odd lines. ########## start of example file... (10 Replies)
Discussion started by: kaaliakahn
10 Replies

7. Emergency UNIX and Linux Support

Replace nth position character of all the lines in file

I want to replace 150th character of all the lines in a file using sed or awk... searched the forums but didn't find exact answer (9 Replies)
Discussion started by: greenworld123
9 Replies

8. Shell Programming and Scripting

Insert at the beginning of odd lines

Hello people, I am trying with sed to insert some text at the beginning of each odd line of a file but no luck. Can you please help. Awk is also suitable but I am not very familiar with it. Thank you in advance for any help. (7 Replies)
Discussion started by: drbiloukos
7 Replies

9. Shell Programming and Scripting

Sum product of even/odd lines

Hi, I have a text file like this 6.0000E-02 0.00000E+00 0.0000 0.00000E+00 0.0000 7.0000E-02 5.00000E-10 1.0000 5.00000E-10 1.0000 8.0000E-02 3.00000E-09 0.4082 3.00000E-09 0.4082 9.0000E-02 3.50000E-09 0.3780 3.50000E-09 0.3780 1.0000E-01 1.00000E-09... (2 Replies)
Discussion started by: f_o_555
2 Replies

10. Shell Programming and Scripting

Search a character and replace it with multiple lines

This is for AIX 6.1, I've a flat file and the format is like this DECLARE some statements; BEGIN some statements; END; I've to search BEGIN and replace it with the following 4 lines BEGIN For x in 1..1 LOOP BEGIN Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies
cowbuilder(8)							     cowdancer							     cowbuilder(8)

NAME
cowbuilder - a pbuilder wrapper for cowdancer. SYNOPSIS
cowbuilder [commands] [options] DESCRIPTION
cowbuilder Executes the specified pbuilder operation with cowdancer COMMANDS
Most commands invoke pbuilder with the specified commands, see pbuilder manual for details. --create Create the base.cow image. The directory for base.cow should be empty, or this command will fail. --update Update the base.cow image. --build .dsc-file Build a package given a .dsc file --login Start a session within the base.cow. --execute Execute a command within the base.cow. --dumpconfig dump configuration information. OPTIONS
Most options are the same as pbuilder, except for the following which are handled specially --buildplace The place where COW operation takes place. --basepath has a very different meaning to basetgz option of pbuilder, since there is no tgz. This option specifies the directory in which the COW master data is stored, the default being /var/cache/pbuilder/base.cow --configfile [configuration file to load] Additional configuration file to read after all other configuration files have been read. --no-cowdancer-update Do not use cowdancer on cowbuilder --update. Please use this option when cowdancer is interfering with upgrade process, or cowdancer itself is being upgraded within chroot. --debian-etch-workaround Work around on Debian etch compatibility. cow-shell will search for all files in chroot, but will work. CONFIGURATION FILES
cowbuilder reads the following configuration files per default. /usr/share/pbuilder/pbuilderrc Application default, not to be changed. /etc/pbuilderrc System-wide default. ~/.pbuilderrc User default anything specified with --configfile option Additional configuration at runtime. CONFIGURATION FILE OPTIONS
The possible configuration options are as follows. Others are ignored. DISTRIBUTION=distribution BUILDRESULT=directory BUILDPLACE=directory BASEPATH=path MIRRORSITE=http://mirror NO_COWDANCER_UPDATE=1 See --no-cowdancer-update DEBIAN_ETCH_WORKAROUND=1 See --debian-etch-workaround EXAMPLES
cowbuilder --create Create a base.cow image. # cowbuilder --create --hookdir /usr/share/doc/pbuilder/examples/workaround/ --distribution etch --debootstrap debootstrap --basepath /var/cache/pbuilder/base-test.cow bash: /root/.pbuilderrc: No such file or directory W: /home/dancer/.pbuilderrc does not exist -> Running in no-targz mode Distribution is etch. Building the build environment -> running debootstrap /usr/sbin/debootstrap I: Retrieving Release . . cowbuilder --update Update the base.cow image. # cowbuilder --update bash: /root/.pbuilderrc: No such file or directory -> Copying COW directory -> Invoking pbuilder W: /home/dancer/.pbuilderrc does not exist -> Running in no-targz mode -> copying local configuration -> mounting /proc filesystem -> mounting /dev/pts filesystem -> policy-rc.d already exists Refreshing the base.tgz -> upgrading packages . . cowbuilder --build test_0.1.dsc Build the package specified in dsc file, with the base.cow image. pdebuild --pbuilder cowbuilder Run cowbuilder --build against the current directory. The current directory should be an extracted Debian source package directory. Edit /etc/pbuilderrc to have PDEBUILD_PBUILDER=cowbuilder to make this the default behavior for pdebuild. cowbuilder --login --bindmounts /home/dancer Start a cow-shell session inside base.cow, with /home/dancer being bind-mounted to within chroot. Note that cowbuilder will not cow-protect what is inside /home/ # cowbuilder --login --bindmount ${HOME} bash: /root/.pbuilderrc: No such file or directory -> Copying COW directory -> Invoking pbuilder W: /home/dancer/.pbuilderrc does not exist -> Running in no-targz mode -> copying local configuration -> mounting /proc filesystem -> mounting /dev/pts filesystem -> Mounting /home/dancer -> policy-rc.d already exists -> entering the shell # cowbuilder --create --distribution sid --basepath /var/cache/pbuilder/base-test.cow Create a base.cow image with the path /var/cache/pbuilder/base-test.cow and distribution sid. AUTHOR
Junichi Uekawa (dancer@debian.org) SEE ALSO
/usr/share/doc/pbuilder/pbuilder-doc.html, pbuilder (8), pdebuild (1) cowdancer 2007 Jun 17 cowbuilder(8)
All times are GMT -4. The time now is 09:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy