General :: Replace The Old One.o With The New One.o?

Feb 15, 2010

I am having problem with the ar cmd. I had already created an archive archive.a with two .o files but I have modified one of them now. How do I replace the old one.o with the new one.o?

I used the ru cmd but it is not working. I don't think I am properly using it, this is how I have it so far:

ar ru archive.a one.o. But this is not working.

View 1 Replies


ADVERTISEMENT

General :: Replace Function Replace More Than One Word With The Same Character(s)?

Apr 23, 2011

Can the Replace function replace more than one word with the same character(s)?

Also, do you know how to access the plugins provided by the gedit-plugins package?

View 3 Replies View Related

General :: Replace All The C's And C's In It With %1?

Nov 13, 2010

I have a document. I want to replace all the c's and C's in it with %1 all the f's and F's in it with %2. i can get sed to do one of them but for some reason i can't get the script to do all the conversions at once.

View 4 Replies View Related

General :: Search And Replace /'s In VI

Feb 7, 2010

I was wondering how I would search and replace all /'s with -'s in vi. %s///-/g doesn't work obviously.

View 2 Replies View Related

General :: Making RPM Replace Another One

Jul 12, 2011

I want to make an rpm which when installed as an update causes another rpm to be removed. I'm fairly sure this is possible because I have seen LibreOffice rpms install as updates replacing OpenOffice rpms in the process without any interaction being required. However I'm unable to figure out how to do it, even after having looked at the spec file for such a LibreOffice rpm.

I have package gstreamer-0_10-ffmpeg installed. I have another package called multimedia installed. I've built a new version of multimedia which includes the gstreamer ffmpeg plugin so I don't need the gstreamer-0_10-ffmpeg package installed any more. I've tried using Provides and Obsolete in the spec file of the new multimedia package. E.g.

Code:
Provides: gstreamer-0_10-ffmpeg
Obsoletes: gstreamer-0_10-ffmpeg <= 0.10.10
(I've tried it with and without version numbers.) Whatever I put in the spec file, when I try and install the new multimedia package as an update zypper says

Code:
$ zypper up -y multimedia
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: multimedia-1.1-1.i586 obsoletes gstreamer-0_10-ffmpeg <= 0.10.10 provided by gstreamer-0_10-ffmpeg-0.10.10-0.i686
Solution 1: replacement of gstreamer-0_10-ffmpeg-0.10.10-0.i686 with multimedia-1.1-1.i586
Solution 2: do not ask to install a solvable providing multimedia > 1.0-2
Selecting an option manually is no good, I need the update to happen without user interaction.

View 3 Replies View Related

General :: Find Or Replace Without Using Sed?

Dec 27, 2010

I am working on writing a script for find and replace a string using sed.But know I want to write without using sed.

View 9 Replies View Related

General :: How To Replace The Path

Feb 16, 2010

I added a path in my bash_profile so that I could use the executables in the directory (I thought). But it turned out some other directory has the same executables and the path had already been added by the previous user. Is there way to overwrite this path? I can't find where that old path was added.

View 10 Replies View Related

General :: Replace Everything Before @ Symbol?

Nov 13, 2009

I have a list of email address's that I need to sift through to identify only the domain name.

xyz@yo.com
abs@yo.com
clahclah@test.com

I want to remove everything before the @ symbol and only print the domain name. Can anyone assist with this?

View 8 Replies View Related

General :: Replace The () With Xxxx?

Dec 29, 2010

I have a sed question

I got the following

(12121) and I want to replace the () with xxxx

so the output would be

xxxx12121

I am using the following but its not working

sed 's/(.*)/xxxxxx/g' TMP4 > TMP5

View 6 Replies View Related

General :: Sed Replace String Up To Tab

Dec 12, 2009

I'd like a sed command to replace all decimal values greater than 0.5 with nothing in a tab delimited text file.

EX:

There would be one tab before 0.301 and two tabs after it. This way when you paste the text into an excel spreadsheet, there are empty cells where you deleted values.

I thought the sed command would be something like:

But this will delete everything.

What I need is something that will start deleting when it sees 0.[5-9] and stop when it reaches a tab. I know you can use [^character]+ to do this, but it doesn't seem to work with a TAB as the character.

Another idea I had would be to have sed replace from 0.[5-9] to 0. and replace with a tab + 0. But I also cant get [^0.]+ to work as it only works with single characters.

View 14 Replies View Related

General :: Sed To Replace First And Second Instance?

Jul 17, 2011

I might just be crazy or particularly dumb today but what I'm trying to do is have sed replace the first and second instance of a character on a line but not after that.

Basically it is a csv file with a date formatted as dd/mm/yyyy and I need to completely remove the slashes. No problem using:

Code:
sed 's////g' < file > outputfile

The only problem is that one of the columns after this may also contain these slashes and shouldn't be removed.

I must have read every single sed page on the net today to find a way to do it to no avail! Is it as simple as :

Code:
sed 's////1' < file > outputfile

And then run the same on the output file again? these two slashes will always be the first and second slashes in the file.

View 6 Replies View Related

General :: Replace Multiple Spaces By One Tab

Feb 2, 2011

Ive some textfiles which contains some colums seperated by a various number of spaces, but instead i need one single tab as a seperator.

View 5 Replies View Related

General :: How To Replace Sendmail With Postifx

Mar 9, 2011

Been using the Amazon EC2 Linux AMI and enjoying it.It comes configured with sendmail. I think I'd rather use postfix.replacing sendmail with postfix might be as simple as what I found searching online:

$ rpm -e sendmail
$ yum install postfix.

However rpm complains:

$ rpm -e sendmail
error: Failed dependencies:
smtpdaemon is needed by (installed) mdadm-2.6.9-3.7.amzn1.i386

View 1 Replies View Related

General :: Can Replace Windows With Wine

May 10, 2011

I will buy a new computer and install Kubuntu on it.The only kind of software that I would run on Windows are PC games. Can I play most of Windows games without problems with Wine on Linux?If Wine cannot run games, how much of disk partition is recommended to install Windows and PC games? Can Windows read ext4 partitions?

View 5 Replies View Related

General :: Replace One Line For Another In File?

Dec 1, 2010

I trying to change a file with hundreds of entries, replacing line with "IP Address Number" for "Host Name", one for another.

this is the original: [IP Address Configuration : "172_17_27_161.SUBNET_U"] IP Address Number = 172.17.27.161Assignment Type = 8Host Name = CAST124Last Used = 1290499294000MAC Address = 1 00 16 35 74 4C 59Client Identifier = 01 00 16 35 74 4C 59and the result desired is: [IP Address Configuration : "172_17_27_161.SUBNET_U"]Host Name = CAST124Assignment Type = 8IP Address Number = 172.17.27.161Last Used = 1290499294000MAC Address = 1 00 16 35 74 4C 59Client Identifier = 01 00 16 35 74 4C 59I know how to change one character by another with sed, but not to change a line for another, because I don't know in which line number it is.

View 3 Replies View Related

General :: Find And Replace String?

Jul 26, 2011

I need to find this "TYPE=MyISAM;" and replace with "ENGINE=MyISAM;" in all .sql files in a directory. How can I do this with sed?

View 2 Replies View Related

General :: Vim Replace All The Same Words In A Certain Line?

Dec 2, 2010

15 for(i = 0; i < N; i++) I want to replace "i" with "test" in the line above,whose line number is 15. When I tried this command :15s/i/test/ Line 15 turned to be this: for(test = 0; i < N; i++) It only replace the first "i",but I want to change all "i" in line 15.

View 3 Replies View Related

General :: Replace Nvidiafb With Another Driver?

May 13, 2010

I'm running Ubuntu 9.10. I've tried installing the correct nvidia-glx driver for my added AGP card but keep getting an error about another driver is working, which is the generic nvidiafb one. How would I disable or remove it to install the correct one

View 1 Replies View Related

General :: Replace A Pattern In A File?

Jun 11, 2010

I want to replace a pattern in a file.The file format is given below.

111111
path=/home/fun/
222222
path=/home/fun/

[Code]....

I want to replace "path=/home/fun" with another pattern, but only under "111111", all the others should be the same.

View 14 Replies View Related

General :: Replace Characters In Txt File?

Nov 7, 2010

I have txt file with list of ID's and I need to insert comma in every line and then remove new line character so it'll become one long string. So to clarify, I have txt file content that looks like this.

234
5466
2356
... and so on.

but I would like this to change to 234,5466,2356,... I looked at sed and tried to wrap my head around the commands but I guess my brain isn't smart enough. its really confusing for me. I've managed to add commas to end of line (sed "s/$/,/g" filename) but somehow I can't seem to remove new line character from each line.

sed 's/[

]*$//' doesn't seem to work.

View 4 Replies View Related

General :: Replace Data - Transaction IDs And Corresponding Value

Dec 22, 2010

I have two files one of which having some Transaction IDS and corresponding value whose sample content as follows:

Code:
SDP-DM-100689014,8.0
SDP-DM-100689202,30.0
And in second file complete details of all Transaction IDs and sample content as follows and delimeter used is comma(,):

Code:
SDP-DM-100689014,2010-12-21 19:24:29 GMT+05:30,CRBT,18,UK,Default,B_11170244,9058629605,405818120653083,,Pre-Paid,Comviva,default_provider,009114500001366,,0.0,code0,0,,Caller Tune,,UK#11561723,,1292939663242,VAS0003ALL,52211,,,UK,,0.0,Grace,
SDP-DM-100689202,2010-12-21 19:24:34 GMT+05:30,Subscription,4,BJ,,B_12326406,9122828964,405876120814560,,Pre-Paid,,default_provider,4945,,40.0,,0,,,,BJ#12106840,,-2206657c%3A12d08f49330%3A4812,VAS0003ALL,,OBD,RECURRING,BJ,,,,

And I want is if column number 1 of first file which is transaction ID matches with column number 1 of second file which is transaction ID than 18th column of second file is replaced with data provided on first file with the respective transaction ID. Example of output as follows:

Code:
SDP-DM-100689014,2010-12-21 19:24:29 GMT+05:30,CRBT,18,UK,Default,B_11170244,9058629605,405818120653083,,Pre-Paid,Comviva,default_provider,009114500001366,,0.0,code0,8.0,,Caller Tune,,UK#11561723,,1292939663242,VAS0003ALL,52211,,,UK,,0.0,Grace,
SDP-DM-100689202,2010-12-21 19:24:34 GMT+05:30,Subscription,4,BJ,,B_12326406,9122828964,405876120814560,,Pre-Paid,,default_provider,4945,,40.0,,30.0,,,,BJ#12106840,,-2206657c%3A12d08f49330%3A4812,VAS0003ALL,,OBD,RECURRING,BJ,,,,

View 1 Replies View Related

General :: Replace OS X On IMac With Kubuntu?

Apr 4, 2011

Machine:
iMac (aluminum from like '06/'07)
Intel Core 2 Duo
1 GB 667MHz DDR2 SDRAM

Can I replace OS X with Kubuntu just the same, and as simply as, replacing Windoz with Kubuntu?

Anything I need to know, advice? Tutorial? Im have not much experience with Macs. I am well experienced with PC multiboots, but all I want to do here is eradicate OSX, and replace. My first time loading Linux on Apple machine.

View 3 Replies View Related

General :: Replace Values In Log File?

May 14, 2010

I have the following values in my log file:

...
2010-05-13 11:00:00 k_TRANSFER OK (11)
2010-05-13 11:30:01 m_TRANSFER OK (21)
2010-05-13 12:00:00 k_TRANSFER OK (12)
2010-05-13 12:30:00 m_TRANSFER OK (32)
2010-05-13 13:00:00 m_TRANSFER OK (13)
...

I want to replace every number with it's decrement. For example, the above values should be:

...
2010-05-13 11:00:00 k_TRANSFER OK (10)
2010-05-13 11:30:01 m_TRANSFER OK (20)
2010-05-13 12:00:00 k_TRANSFER OK (11)
2010-05-13 12:30:00 m_TRANSFER OK (31)
2010-05-13 13:00:00 m_TRANSFER OK (12)

View 5 Replies View Related

General :: Sed Code To Replace Character?

May 17, 2011

This is what i doing to remove ( and ) sed 's/(//'|sed 's/)//') Can you offer me some better sed code that remove ( and ) with blank without using pipe (|) . I mean sed code that check ( or ) and replace that with blank character.

View 2 Replies View Related

General :: Sed Find And Replace With Wildcard?

Aug 5, 2011

I would like help with modifying the following content:

toolbox/perl/man/man3/ExtUtils::Command.3::Command.3 differ
toolbox/perl/man/man3/ExtUtils::Command::MM.3::Command::MM.3 differ
I would like the content to be changed to:
toolbox/perl/man/man3/ExtUtils::Command.3
toolbox/perl/man/man3/ExtUtils::Command::MM.3

I was not sure how to tell sed what to look for? I tried the following but it did not work. sed -i 's/::* differ//g' mandiff.log

View 3 Replies View Related

General :: Using Sed To Send A Variable And Replace?

Oct 6, 2010

I can't figure out the exact sed to make this work. I've installed CentOS and am trying to pass variables to a network-config file.

variables:
$ipAddress
$netmask

[code]...

View 1 Replies View Related

General :: Replace Symbolic Links With Files?

Jun 28, 2011

Is there an easy way to replace all symbolic links with the file they link to?

View 4 Replies View Related

General :: Find And Replace Command For Whole Directory

Aug 17, 2011

Is there any command in Linux which will find a particular word in all the files in a given directory and the folders below and replace it with a new word?

View 4 Replies View Related

General :: Remove <br> Html Tag And Replace With Newline

Dec 2, 2009

I've been playing around with sed but can't find a way to remove the <br> html tag and replace it with a newline. Sed isn't truly needed awk or other suggestions could be good.

View 3 Replies View Related

General :: Replace Multiple Instances From X To Y In Line

Feb 1, 2010

I have a line of text with multiple web links in the line. I'd like to replace the actual links with the text "<web-link>" so I don't accidentally hit them while reading on my iphone. I've tried many versions of the following sed command, sed 's/(http.*)/<web_link>/g', but it simply replaces everything between the first instance of "(http" and the last instance of ")" with <web_link>, or does nothing at all.

Ex: This line has a link to a web page (http://www.webpage.com/file.html) then some more text (extra text) and then another link (http://www.nextwebpage.com.index.html) to a website.
$ echo "This line has a link to a web page (http://www.webpage.com/file.html) then some more text (extra text) and then another link (http://www.nextwebpage.com.index.html) to a website." | sed 's/(http.*)/<web_link>/g'

What I get is: This line has a link to a web page <web_link> to a website.
What I'd like is: This line has a link to a web page <web_link> then some more text (extra text) and then another link <web_link> to a website.
What am I doing wrong with my sed command?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved