Search Results

Search: Posts Made By: Trapper
1,942
Posted By Trapper
Doing multiple tasks in a loop.
I am in the process of updating a folder of hundreds of recipe html files. I've already managed to modify a number of things in each file but I have run into something that's beyond my ability.

I...
1,504
Posted By Trapper
The "normal way" works properly for me ahamed. I...
The "normal way" works properly for me ahamed. I appreciate your help here. I'll finish out my script and do a test run on a duplicate of the folder of html files. I shall post my results. Thank you...
1,504
Posted By Trapper
Okay, I get "awk: cmd. line:1: warning: escape...
Okay, I get "awk: cmd. line:1: warning: escape sequence `\/' treated as plain `/'" when I run the command but I do get the text insertion.

You are correct though. I do not get "\n" in the...
1,504
Posted By Trapper
Text file insertion via sed
I have 800+ html files that need to have a javascript added to them in the head. I can do the looping, setting filenames as variables, etc. but I cannot figure out how to insert my javascript file...
1,363
Posted By Trapper
yinyuemi, Okay, your second script...
yinyuemi,

Okay, your second script performs correctly and places the lines below the current last line in the target file. Now I will research your script and figure out what everything does so...
1,363
Posted By Trapper
yinyuemi , I have tested your script and...
yinyuemi ,

I have tested your script and it works as desired except that it places the lines before the first line of the target file. I need the lines inserted after the last line of the file.
1,363
Posted By Trapper
Merging folder of files according to name and contents.
I have absolutely no idea how to do this and everything I have done doesn't even come close.

Here's the scenario:

There are a number of files in a folder named in this manner:

agd.txt...
1,342
Posted By Trapper
It seems that the suggestions above work if I run...
It seems that the suggestions above work if I run them from a terminal but in my script I get something different.

As an example:

tr -d '"' < list.txt

gets me what I am looking for.
...
1,342
Posted By Trapper
Extracting Complete Text Between " "
The script:
for i in $(awk '/\".*\"/' list.txt)
do
echo $i
done

iist.txt:
"Willie"
"Willie Willie"
"Willie Willie Wee"
"Willie Willie Wee Wee"

The results:
"Willie"
"Willie...
42,477
Posted By Trapper
Yeah, I caught that when comparing my attempts to...
Yeah, I caught that when comparing my attempts to the suggestions that were submitted. I retain well when learning by trial and error and this was definitely an error. :)
42,477
Posted By Trapper
Well, both of these work just fine. My own...
Well, both of these work just fine. My own attempts with sed were not even close to:
sed 's/.*"\(.*\)"[^"]*$/\1/'


Obviously, I am going to have to study this a little bit, now that I have a...
42,477
Posted By Trapper
Extracting Text Between Quotes
I won't pretend. I am no bash, grep, awk or sed specialist but I have tried for a couple of days to extract something from a line in a file but have badly failed. There are just too may parenthesis,...
Forum: What is on Your Mind? 01-16-2008
40,545
Posted By Trapper
Gads ... A twin pair of nice, custom, Fedora 8...
Gads ... A twin pair of nice, custom, Fedora 8 desktop boxes for me and my lady, an scsi ultra 160 based postfix box, a klunker 700 Mhz IPCop/Copfilter box, a good test box with dual 1000 Mhz P3's...
20,402
Posted By Trapper
I happened upon this code while googling. It has...
I happened upon this code while googling. It has resolved my text format problem. It maintains ms-dos format when appending the files.
for i in *.log; do (echo '0r...
20,402
Posted By Trapper
Well, I have made a bit of headway in converting...
Well, I have made a bit of headway in converting this MS-DOS batch over to bash. This seems to work from a terminal. Have yet to try it in a script. I have no doubt there's a much easier, much...
20,402
Posted By Trapper
Here's the dos batch code. I note that in my...
Here's the dos batch code. I note that in my original post that I failed to mention that the original files I am working with also get moved off to an archive, unmodified. There's never a filename...
20,402
Posted By Trapper
Find, Append, Move & Rename Multiple Files
Using a bash script, I need to find all files in a folder "except" the newest file. Then I need to insert the contents of one text file into all the files found. This text needs to be placed at the...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 10:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy