General :: Replace File1.tgz With Another Version Of The Same File?

May 30, 2010

i got the slackware folder with my builds of my favorites packages, in /tmp i create the new versions of that packages. theres is a way in bash to replace the new ones in /tmp with the old ones in /home/user/slackware??

something like..... in /tmp: mv -i package1.tgz /home/user/slackware | and somethin to replace the old version of the app with the new one

View 8 Replies


ADVERTISEMENT

Ubuntu :: Restore A File After A >file1?

Jun 30, 2010

a collegue has done this for a shell script > test1.sh .lolnow i must rewrite the script.do you have any idea to find my script?

View 2 Replies View Related

OpenSUSE Install :: Possible To Replace 32bit Version Of 11.1 With 64bit Version Of 11.2?

Dec 13, 2009

How do I replace a 32bit version of 11.1 with a 64bit version of 11.2 or is it even possible?

View 2 Replies View Related

Ubuntu Installation :: Replace Desktop Version With The Netbook Version?

Nov 22, 2010

i would like to replace my Ubuntu Desktop version with the Netbook version. I dont mind losing my current data on the desktop version but if there is a way for me not too i would love to know

View 2 Replies View Related

General :: Merge File1 At End Of Line File2?

Mar 23, 2010

how I can merge the data from file1(data per line) to the end of line of file2. So what I mean is, I want to add every line from file1 to the end of the corresponding line of file2.

View 2 Replies View Related

Programming :: Adding Line From File1 Into A Line Of Another File Based On Maching IDs

Jan 3, 2011

I wish to add information to one of my files based on matching IDs,

Here is an example

(the id is the 3 colunm)

(the ID is the 2 colunm)

And the output i wish to be

OUTPUT:

So as you can see the ones that do not match are still present, and the ones that do match just have the extra information from file2.txt added to them.

I thought about using join but that only seems to join the ones that match displays thoes only. i would like all the information in the output file.

View 6 Replies View Related

Ubuntu :: Replace A Version With A New One?

Jan 17, 2011

Is there a way to replace my Ubuntu 9.04 with the latest version?

I have backups, so all I need is to be able to reformat all the present partitions and install the new version. I will recopy my useful files from external disk.

*) I am using Windows Vista in dual boot.

*) Unfortunately I do not have home on a separate partition.

View 9 Replies View Related

CentOS 5 :: How To Replace With Appropriate X86-64 Version

Apr 17, 2011

i just noticed a bunch of installed i386 rpms on my freshly created x86_64 v.guest.Several questions:

1. why ?
2. how to replace with appropriate x86-64 version?
3. can i find out from which repo the rpm was installed?

View 3 Replies View Related

General :: Comparing Files - Change The Case Of The Letters In File1.txt

Nov 8, 2009

Two files contain:

file1:
cat
dog
fish
hamster

file2:
cat
fish
ferret
dog

How do you change the case of the letters in file1.txt to uppercase and compare with file2 all in one command?

View 2 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 :: 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 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 Command To Replace File Extension?

Dec 9, 2009

how to use a variable in a sed command, but I can't get the output into a variable.

FILE=readme.txt
now i want to remove the extension of filename
so file woud be:
FILE=readme

my script:

NFILE=`echo $FILE | sed 's/.txt//'`
mv ../out/$FILE ../out/$NFILE
FILE=$NFILE

now when i run my script. i get this unknown character extensions in my new file(NFILE).

View 14 Replies View Related

Ubuntu Installation :: Can't Replace The 1.2 Stable Version

Mar 3, 2010

I'm using Ubuntu 9.10 and I'm trying to install DirectFB 1.4.3. I can do it with no problems by downloading the sources from the directfb website and installing it by hand. but I can't replace the 1.2 stable version that is in the apt-get tree. Is it possible to do it?

View 1 Replies View Related

General :: Ubuntu - Replace A File In Jar With Command Line ?

Oct 18, 2010

I have a jar, and I need to replace a class in it, at this moment, I can only open it with "archive manager" and then drag and drop the new compiled class into the jar, but I think this is really boring, if I can do with with just a command ?

View 1 Replies View Related

General :: Using Sed To Replace String With Special Characters In XML File?

Apr 29, 2011

I am having difficulty getting sed to replace a string of text in an XML file, despite the fact that I have no trouble using grep to find that same string. Since the new string and old string to be replaced contain a lot of special characters, I thought it best to store them in variables as opposed to using a slew of backslashes:

OLD_STRING='<property name="webServiceHost">${jboss.bind.address}</property>'
NEW_STRING='<!--<property name="webServiceHost">${jboss.bind.address}</property>-->'

[Code]....

View 2 Replies View Related

General :: Using Sed To Replace A *large* Number Of Variables In A File?

Jul 28, 2011

I have a large number of log files, on a linux box, I need to cleanse sensitive data from before sending to a third party. I have used the below script on previous occasions to perform this task, and it has worked brilliantly (script was built with some help from here :-)

#!/bin/bash
help_text () {
cat <<EOF
Usage: $0 [log_directory] [client_name(s)]
EOF

[Code]...

However, now one of our departments has sent me a CLIENT_FILE.txt with 425000+ variables! I think I may have hit some internal limit. I have tried splitting the client file into 4 with around 100000 variables in each, this still doesn't work. I'm loathe to keep splitting though as I have 20 directories with up to 190 files in each directory to run through. The more client files I make, the more passes I have to do.

View 2 Replies View Related

General :: Command To Find / Replace In A Text File?

Feb 11, 2011

I have an SQL dump, file.sql that has many references to a particular domain, d1.com. I would like to run a command that can replace every occurrence of d1.com with d2.com. I've tried looking into sed before but the man pages are quite daunting.

View 14 Replies View Related

General :: Replace A String In Multiple File & Sub Directories?

Aug 31, 2010

Need to replace the following string :

By

In multiple .exp files and in sub directories.

View 5 Replies View Related

General :: Replace Sequential Numbers In A File With A Different Sequence Using Sed?

Apr 11, 2010

I am trying to find a way to replace a set of sequential numbers in a file with a different sequence using sed. This might be done easier using awk or some sort of bash script, but it seems to me there must be a way to do this easily with sed. Basically, what I am editing is a Cisco switch config. I want to change the sequence of ports to a different numbered sequence. Here is an example of what I am trying to do.I want to change for example, the file:

Code:
cat testfile
interface FastEthernet0/1

[code]...

View 6 Replies View Related

OpenSUSE :: Compile Mesa To Replace Version In Repo?

Apr 16, 2011

I am compiling mesa and it compiles ok but I think it it compiles to the usr/local/lib but I want to replace the system version as I want applications to use my compiled version instead.

How do I do this?

View 2 Replies View Related

General :: Replace Nth Occurence Of String In Each Line Of A Text File?

May 20, 2010

I have large text files with space delimited strings (2-5). The strings can contain "'" or "-". I'd like to replace say the second space with a pipe. What's the best way to go?
Using sed I was thinking of this:

sed -r 's/(^[a-z'-]+ [a-z'-]+) /1|/' filename.txt

View 2 Replies View Related

General :: Replace File-test-script With File_test_script X100

Apr 13, 2011

In a directory containing hundred files called file-test-script-001 ... file-test-script-100

how do I rename each one to file_test_script_001 ... file_test_script_100 ?

View 4 Replies View Related

General :: Perl Script To Replace The Number From Text File?

Jun 21, 2010

on creating a new perl script which replace IP address from the text file. eg. If in a file, we found any word like 11.222.333.44 then it has to be replaced to XX.XXX.333.44

View 8 Replies View Related

General :: Replace A String In A File Using A Script With Path Containig /

Feb 26, 2010

I need to replace a string in a file(startup.sh) using a script(parser.sh). After running parser.sh startup.sh should be filled with nfs path like /home/vimal etc but im getting error since path contains /. how to remove this.

View 3 Replies View Related

Fedora :: Proper Way To Replace Existing Kernel With Earlier Version

Jul 26, 2009

I would like to replace the exiting kernel in one of my Fedora 11 installs with an earlier kernel from a Fedora 10 Unity Spin...so I can use it to bring ATI functionality to Fedora 11. Also, I recall there being a way to unpack rpms and 'repackage' them using a different kernel development set. How is this done?

View 3 Replies View Related

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 :: Script To Access Sqlplus And Use The Output To Replace The Result In Another File?

Aug 30, 2010

I am trying to write a script to access sqlplus and use the output to replace the result in another file. But I am having some issues with it (This script is just a test script and I am just trying to print the updated value.

#!/bin/bash
I am not able to post the sqlplus connection, but it works.
bb=$a

[code]....

View 2 Replies View Related

General :: Script To Traverse Into Sub-directory And Replace Line Of File Inside Zip?

Aug 27, 2010

I can't get sed to actually change the file, clearly there's something basic not working, can anyone point me in the right direction? I know nothing about scripting. Oh yeah, all the directories have spaces which was why so elaborated.

find . -name "*epub" | while read file; do unzip -o "$file" content.opf && mv content.opf content.opf.bak && sed 's/<dc:language>UND</dc:language>/<dc:language xsi:type="dcterms:RFC4646">EN</dc:language>/' < content.opf.bak > content.opf && zip "$file" content.opf && rm -f content.* ; done

View 2 Replies View Related







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