Please I need your help... I need small script to do the following.
I have a thousand of files in a folder produced daily.
I need first to merge all files called. txt (0009.txt, 0010.txt, 0011.txt) and and to output a resume of all information on 2 separate files in csv format (I wrote .txt only to be able to upload the files), at the output should be to files RP.csv and SP.csv , as I show in the attached files..
So, what have you tried so far?
What language or tools are you most comfortable with?
What shell are you using?
What is your operating system and version?
What logic rules do you have for merging the files are generating the reports?
It create for many files like
AP.csv, CP.csv, HP.csv, YP.csv, ZP.csv and I need in the output only The RP.csv and SP.csv. How we can eliminate at the begining all the rows which start with letters A,C,Y and Z, to avoid to get these output files.
And also in the row 18 for each file there is a value that I need to recovery and to put at the end of each row.. example.
I mean for each file we need to check the value in the row 18 and to append in all rows starting with R these values, For each file will be a diferent value..
You lost me. Which value from line 18 (FNR==18) do you want to save and append to the respective R- lines of that file?
To eliminate the A, Y, Z line try sth like
Hello,
I am using a script to create a random password for a user.
The file looks like
user1:thepassword1
user2:thepassword2
user3:thepassword3 Passwords are openssl passwd hashed. I have an own file where the password is written in cleartext.
Now i want to send an E-Mail to the... (8 Replies)
i need my script1.sh to generate /tmp/temp.txt with full permissions i.e
-rwxrwxrwx 1 user1 users 23 Dec 16 10:52 /tmp/temp.txtmore script1.sh
umask 666
echo "hello">/tmp/temp.txt
But the script1.sh generates temp.txt with different permissions as shown below.
-rwxr-xr-x 1 user1 users... (6 Replies)
Hi,
My requirement is,there is a directory location like:
:camp/current/
In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Hi,
I'm trying to use perl to generate files based on sections in a large textfile.
This will create one file per section that starts with " ABC_":
perl -n -e '/^ABC_/ and open FH, ">output_".$n++; print FH;' largefile.txt
However, the output filenames will be on the form output_nn. This... (2 Replies)
I copied all JPEGs from my laptop to an external drive using
find . -name "*.jpg" -exec cp '{}' ./media/Backup/pictures \;
And then deleted all of them from my laptop.
Now, I realize that I need the folder path of all the original JPEGs as the path has the important information.
I dont... (1 Reply)
hi,
i am facing a problem in merging two files using awk,
the problem is as stated below,
file1:
A|B|C|D|E|F|G|H|I|1
M|N|O|P|Q|R|S|T|U|2
AA|BB|CC|DD|EE|FF|GG|HH|II|1
....
....
....
file2 :
1|Mn|op|qr (2 Replies)
Hi everybody,
I am wondering if there is any tool or website out there which can track who is viewing my resume. It is very frustrating when you send your CV or Cover Letter and you receive no feedback from the company, you don't even know if they have checked it out.
Thanks for your help (1 Reply)
Hi Expert,
I have some confusing to generate report from the log file as shown below:
filename :test1.log
start_time date end_time number code
P 000029.621 20070823 000029 12134567890 111111111111 00 0 000 003... (4 Replies)
Hello people
I need to find a way to generate a file that contains the names of all *.jpg files that were generated after a specific date
The search should start in my current folder and recursively search inner folders
It would be best to list the file names one below the other in the output... (3 Replies)