Sponsored Content
Full Discussion: sed magic
Top Forums Shell Programming and Scripting sed magic Post 302479603 by redsolja on Saturday 11th of December 2010 08:31:15 PM
Old 12-11-2010
sed magic

I want to become an expert @ using sed, but i do not have enough time...

Atm I have a repository in my apt/sources.list but it is commented out since i do not want to install packages from it (backtrack repository) except the exploitdb package.

I would like make a command, lets say "update-exploitdb" which uncomments the specific repository at my apt/sources.list (using sed probably), then updates, and then re-installs the exploitdb package at the newest version. After doing that, the backtrack repository is commented again.

So, i would like to know the way to do this text edit with sed...

Code:
...
...
...
############################################### BACKTRACK REPOS
#deb http://archive.offensive-security.com pwnsauce main microverse restricted universe multiverse


I would appreciate any help..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Boot Magic 7

For a multi-boot setup (win2K, XP & SuSE) over 3 drives, where should Boot Magic be installed to? And does it matter which o/s installs it? (3 Replies)
Discussion started by: onestepto
3 Replies

2. UNIX for Advanced & Expert Users

what is magic file ?

i am working under this sysytem SunOS sparc SUNW,UltraAX-i2 Some system on this server creates a file named like this. Elem_ee.xml.gz Elem_ee.xml.gz.magic In order to look into Elem_ee.xml.gz.magic, i first renamed Elem_ee.xml.gz.magic to Elem_ee.xml.gz and tried to unzip it. but returns... (3 Replies)
Discussion started by: oppai
3 Replies

3. UNIX for Dummies Questions & Answers

Partion Magic problems.

Hiya people, A great big "HI" to everybody. I'm new to the Forum and now to my problem(s). I am about to partition my only 80GB HD and using the Partition Magic 8 software it looks fairly simple although here is my problem :- 1. Do I change the new partition to primary or logical? 2. Do I... (4 Replies)
Discussion started by: Syndrome_00
4 Replies

4. UNIX for Dummies Questions & Answers

magic.h

Where can I find #defines for filetypes like the ELF etc and the magic.h file? CAn anyone advice. Thanks in advance. (0 Replies)
Discussion started by: vijlak
0 Replies

5. UNIX for Advanced & Expert Users

magic.h

Where can I find #defines for filetypes like the ELF etc and the magic.h file? CAn anyone advice. Thanks in advance. (1 Reply)
Discussion started by: vijlak
1 Replies

6. Shell Programming and Scripting

sed magic!

Hi, I have this line in my script, and works perfect! tran= "$(sed = "$fname" | sed "/./N; s/\n/: /" | sed -n "${beg},${end}p")" $fname its a file, and gets multilines between beg and end.: Something like this: 1: line a 2: line b 3: line c But now, I want insert in the end of each... (9 Replies)
Discussion started by: vibra
9 Replies

7. UNIX for Dummies Questions & Answers

magic 8ball

when i use this code for the script of the magic 8ball, i get an error message and it always displays the sam answer. What am i doing wrong or what am i missing thanks #!/bin/sh #< Magic eight ball! # KW 26/11/04 # Requires "rand" echo "Enter \"q\" followed by return to quit" function... (6 Replies)
Discussion started by: JamieMurry
6 Replies

8. What is on Your Mind?

I got a magic wand

My new magic wand just came. It looks great. Looking at it, it looks like it is carved by hand from a solid piece of wood. It could easily serve as a prop in a Harry Potter film. But it is actually a high tech appliance. A built-in accelerometer can detect how you are moving the wand. ... (2 Replies)
Discussion started by: Perderabo
2 Replies

9. Shell Programming and Scripting

sed magic

Hello all, I have an inherited an old ugly script I'm trying to clean up a bit. What I am currently working on is a line like the following: Complication=" and ta.secID = 011222 and upper(ta.proc_ctrl_no) != 'IMPACT'";; I just want to combine a search for lines that begin with... (5 Replies)
Discussion started by: blip42
5 Replies
OUTDATED(1)							    DOSE Tools							       OUTDATED(1)

NAME
dose--outdated - detect uninstallable packages due to obsolete dependencies SYNOPSIS
dose--outdated [option] ... file ... DESCRIPTION
dose-outdated identifies in a debian package repository those packages that are not installable with respect to that repository by the their inter-package relationships (dependencies, conflicts, ...), and that furthermore cannot become installable (in the current version) how matter how the rest of the repository evolves. This means that this package has to be updated in the repository to ever become installable again. Input Specification Input files have to contain stanzas in the format of deb-control(5), separated by one blank line. For instance, the Packages files as found on a Debian mirror server, or in the directory /var/lib/apt/lists/ of a Debian system, are suitable as input. The repository used in the analysis consists of the union of all packages from the input files. Output Specification The output of dose-outdated is in the YAML format. OPTIONS
-f --failure Print the list of broken packages -e --explain Explain the results in more detail. -s Print a summary of broken packages. --dump Dump to standard output in CUDF format the packages that are internally generated and exit (mostly useful for debugging purposes). --checkonly package[,package] ... Specifies a list of packages to check. By default all packages are checked. -v Enable info / warnings / debug messages. This option may be repeated up to three times in order to increase verbosity. --progress Display progress bars. -h, --help Display this list of options. EXAMPLE
dose-outdated -f -v /var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_main_binary-amd64_Packages AUTHORS
Pietro Abate and Ralf Treinen SEE ALSO
dose-distcheck(5) dose-challenged(5) <http://www.mancoosi.org> is the home page of the Mancoosi project. dose3 3.0.2 2012-10-03 OUTDATED(1)
All times are GMT -4. The time now is 04:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy