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...
You could open the file in an editor and remove the hash mark. I'm not familiar with apt, but if it's similar to yum, it'll have an option to enable a specific repository. With yum, I'd just use enablerepo=backtrackrepo.etc.
I'd suggest you read man apt.
I guess i was totally misunderstood. I am sorry for my english usage...
What i am asking is this:
Could anyone share a sed command that removes the # character from the beginning of a line that i want to in the apt/sources.list file? What is the command to use again if i want to put the # character back where it was? The specific line that i want to do that is the following:
ps: The second question is not 100% necessary since i can just copy a backup over the last edited file to get my # char back. But using a sed command makes it more elegant.
Thank you for your reply scrutinizer.
I think this command works for every entry that is commented in my /etc/apt/sources.list file. But i can manage it to work by using grep to change only the particular entry that i mentioned.
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)
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)
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)
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)
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)
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)
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)