10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.. I have this delicate problem..:wall: I have this huge ldif file with entry's like this example below..
And I need to change the following entrys.
telephoneNumber:
emNotifNumber:
billingnumber=
BillingNumber:
Al these entrys has a number like 012345678 and it needs to add one more... (15 Replies)
Discussion started by: pelama
15 Replies
2. Shell Programming and Scripting
I have the following text as an input text:
input.txt
Results('Toilet', 'Sink', )
and i want to remove the last comma so the output is
output.txt
Results('Toilet', 'Sink' )
I tried using the following sed command, but I get a parsing error:
sed s/, \)/\)/g input.txt >... (5 Replies)
Discussion started by: jl487
5 Replies
3. Shell Programming and Scripting
sed 's/<\/body>/<A HREF='"$index"'>'"$description"'<\/A>\
<\/body>/' "$index"
This will work from the command prompt, but not from my ksh script.
Why not?
sed: command garbled: s/<\/body>/<A HREF=/accounts/students/b/bmwg6c/public_html/index.html>I would like to call it white... (4 Replies)
Discussion started by: robin_simple
4 Replies
4. Shell Programming and Scripting
I use the following as part of a script to correct for a faulty hostname file.
# get the domain name
read -r thehostname < /etc/hostname
dom="$(echo $thehostname | cut -d'.' -f2)"
numchar=${#dom}
if
then
echo "It appears as though the hostname is not correctly set."
echo "Hostname has... (5 Replies)
Discussion started by: bugeye
5 Replies
5. UNIX for Dummies Questions & Answers
dears
i have the data below, i want a command ( i think it should be sed) that add a space after the seconds as below :
Jun 24 22:28:18966568406148@
Jun 24 05:47:35966555747744@
Jun 24 05:47:53966560825239@
Jun 24 06:07:52966541147164@
Jun 24 15:49:55966566478883@
thanks... (5 Replies)
Discussion started by: thehero
5 Replies
6. Shell Programming and Scripting
In a LaTeX manuscript, I need to replace many occurrences of
\emph{some string}
with some string, i.e. whatever string is inside. The string inside often may extend over several lines, and there may be other occurences of curly brackets inside it. So for example
\emph{this \it{is} a... (5 Replies)
Discussion started by: sune
5 Replies
7. Shell Programming and Scripting
Dear experts,
I have a file called "check" with contents like below
i used the sed command like below to get the value of "success" and "failed" only
My question is how can i get the value to include the time "03:15", so that i can get a value such as below : -
Appreciate... (4 Replies)
Discussion started by: aismann
4 Replies
8. Shell Programming and Scripting
hello
i have a file (myfile) contains line as follows
/home/mytarget/myproject
i want to add a pattern at the end of this line.
my pattern is- /.*mk
i want like it - /home/mytarget/myproject/*.mk
i tried sed like
sed 's/$//*.mk/' myfile > newfilename, but not wrking.
pls... (2 Replies)
Discussion started by: shailesh_arya
2 Replies
9. UNIX for Dummies Questions & Answers
I want to use sed to look for spaces in text and when find one move the next word to the next line.
I used:
sed 's/ /\n/g' out > new
However when there is more than one space between two words it adds more lines between them. And I just want the words to be one under another. How can I... (2 Replies)
Discussion started by: sovixi
2 Replies
10. UNIX for Dummies Questions & Answers
hi,
I'm trying to use sed to erase everything, up to, and including, the first closing parenthesis. for example:
input: blah blah blah (aldj) test (dafs) test test.
output: test (dafs) test test.
how would i do this?
I was fooling around with the parenthesis, and i only got it to apply to... (5 Replies)
Discussion started by: gammaman
5 Replies