10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everybody,
I have a Problem with sed command.
I want to replace a defined string with a string from a database field (dynamic).
e.g.
sed -i -e 's/%NAME%/'"$HNAME"'/g'
The Problem is that the $HNAME variable can contain Special characters like '&'
e.g.
HNAME="AH Kruger & Co. KG"
... (1 Reply)
Discussion started by: Bambuti2000
1 Replies
2. Shell Programming and Scripting
Hi Guys
Am working on a bash script but got stuck, in this line:
32 $configValues = '';
What would be the best command to enter the password between the " Perl or sed ?
Been trying with Perl using this command:
perl -pi -e 's/''/Seattle#1669!/g'... (5 Replies)
Discussion started by: Tox
5 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
After using the egrep command to pull certain lines from the asg5f1 (creating the asg5f1c file), I am required... (1 Reply)
Discussion started by: robrom78
1 Replies
4. Shell Programming and Scripting
I'm new using Unix commands in applescript. The following script you choose different folders with PDfs, get file count of PDfs on chosen folders, & write the results in text file.
set target_folder to choose folder with prompt "Choose target folders containing only PDFs to count files" with... (0 Replies)
Discussion started by: nellbern
0 Replies
5. UNIX for Dummies Questions & Answers
Hi
I am having a 'grep' headache
Here is the contents of my file:
(PBZ,CP,(((ME,PBZ,BtM),ON),((ME,((PBZ,DG),(CW9,PG11))),CW9,TS2,RT1)))
I would like to count out how many times 'PBZ' occurs and then place that number in the line above
3... (8 Replies)
Discussion started by: cavanac2
8 Replies
6. Shell Programming and Scripting
Hello,
Can any perl experts help me convert my sed string to perl. I am unsuccessful with this.
I have to remove this string from html files OAS_AD('Top');
I have come up with this. However the requirement is in perl.
for find in $(find . -type f -name "file1.html") ; do cat $find |... (2 Replies)
Discussion started by: abacus
2 Replies
7. UNIX for Dummies Questions & Answers
I've shell script where i used the below command to take the line which contains patterns.
sed -n "/$year 05:/,/$year 17:/p" trace.log | grep -f patterns.txt > output.log
This was working fine for long time, but now a days this script is not working with and throwing error like
sed:... (8 Replies)
Discussion started by: senthil.ak
8 Replies
8. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
9. Shell Programming and Scripting
I want to write a sed command that does the following work:
file: <a>asdfasdf<\s>
<line>hello</line>
<b>adf<\c>
<b>tttttttt<\c>
output:
name=hello
sed -e 's/^*//' -n -e '/<line>/s/<*>//gp;' -e 's/^/name="/g' file
but I can not append "=" after getting the line with... (5 Replies)
Discussion started by: minifish
5 Replies
10. Shell Programming and Scripting
Hi,
Below is a small piece of my Korn shell script - what i am trying to do is substitute all occurrences of the word given by the ${src} parameter with the word given by the ${dest} parameter in that particular textfile. But i get the errors below...
for i in `ls... (19 Replies)
Discussion started by: n8575
19 Replies