I will have to process multiple files with same name everyday.
My requirement is:
If on a certain day I see that filename.txt exists then the contents of the filename.txt would be added/append
to the former file contents.Each time it sees the file the content would be added.But the header ... (8 Replies)
Hi, I am trying to do something relatively easy, but am having some trouble getting it to work.
I have multiple files called "distances.log" in numerous subdirectories and sub-subdirectories within a directory. I would like the contents of each of these "distances.log" files to be appended to a... (2 Replies)
I have a file like below
#GROUP A belongs to Asia
GROUP A jojh hans local admin
GROUP A gege fans michel jing jong
#GROUP U belongs to USA
GROUP U jeff goal hello world
My requirement is to grep for first apperence of GROUP A which is not commented and append my name to end of file.... (12 Replies)
Hi All,
I am trying to write a shell script but not getting desired output.
What i am trying to do.
1.I want to use find command command and then use it xargs/exec to append the find output.But i am not getting desired output
here is what i am trying to do
#find init*.ora -exec `echo... (4 Replies)
Hi Experts,
Is there a way to find a string in a file then append a character to that string then save the file or save to another file.
Here is an example.
>cat test.txt
NULL
NULL
NULL
9,800.00
NULL
1,234,567.01
I want to find all NON NULL String and add a dollar sign to those... (9 Replies)
Hi,
I'm a newbie at programming in Unix, and I seem to have a task that is greater than I can handle. Trying to learn awk by the way (but in the end, i just need something that works). My goal is to compare two files and output the difference between the two. I've been reading, and I think I... (5 Replies)
Hi,
How to change the filenames with timestamp in sub folders
I have the following code to select the records.
find . -type f -name '*pqr*' -ctime 1 -print
The following is the example
app_root_dir="/`echo $ScriptDir | cut -d'/' -f2`"
$app_root_dir/../BadFiles directory
uvw.bad... (3 Replies)
Hi,
Bit of a tricky one for first post and hoping someone can help me out here.
I've got some code that I'm trying to consolidate by taking the first line where it says "OUTPUT", remove the : and append it after a space where the are occurences of ".csv", and then take the next occurence of... (3 Replies)
Task: Find keywords in each line, and append at the end of line; if not found in the line, do nothing.
the code is wrong. how to make it work. thanks a lot.
cat keywords.txt | while read line; do
awk -F"|" '{if (/$line/) {print $0"$line , ";} else print;}' outfile.txt > tmp
... (9 Replies)
Hi,
$ cat f1
My name is Bruce and my surname is
I want to use SED to find “Bruce” and then append “ Lee” to the end of the line in which “Bruce” is found
Then a more tricky one…. I want to INSERT ….a string… in to a line in which I find sometihng. So example
$ cat f2
My name is... (9 Replies)