Categories
Mastering Development System & Network

How to analyse vsftpd log files with goaccess

I’m trying to use goaccess log analysis tool, to analyse vsftpd FTP server’s logs. I’m aware that being a web server log analyser, goaccess is not the best tool for this. That being said, it’s flexible enough with the log format and we’re already using it to analyse the web server’s log, so I decided […]

Categories
Development

Using python subprocess to call python command with whitespace separated list

I would like to call a python subprocess wich should execute something in the structure of script.py -m opt -o oFile -i file1 file2 file3 … I have a comma separated list inputFileList = file1,file2,file3 and I tried to build the command like cmd = [‘script.py’, ‘-m opt’, ‘-o oFile’, ‘-i’] for file in inputfileList.split(‘,’): […]

Categories
Development

How to append to a data frame from multiple loops

I have a code, which takes in files from csv and takes a price difference, but to make it simplar I made a reproducible example as seen below. I want to append each result to the end of a specific column name. For example the first loop will go through size 1 and minute 1 […]

Categories
Development

Calculate average from 3 tables with R

I have data that consists of 3 files: file1.csv, file2.csv, file3.csv. The files are replicate measurements. Each file consists of 96 values, arranged in 12 columns (1-12) and 8 rows (a-h). I need to calculate the mean of each measurement in the 3 replicates (e.g. the mean of a1(file1, file2, file3), a2, etc). I don’t […]

Categories
Development Linux

Awk for certain files in a directory

I have a directory called ‘directory1’ with files: file1, file2, file3, that have been passed by in a variable ‘files’. Echo $files has the following output: file1 file2 file3. I want to have the sum of the sizes but the code below only works for only one file. How can I make it work for […]

Categories
Development Linux

Awk for certain files in a directory

I have a directory called ‘directory1’ with files: file1, file2, file3, that have been passed by in a variable ‘files’. Echo $files has the following output: file1 file2 file3. I want to have the sum of the sizes but the code below only works for only one file. How can I make it work for […]

Categories
Development Linux

Awk for certain files in a directory

I have a directory called ‘directory1’ with files: file1, file2, file3, that have been passed by in a variable ‘files’. Echo $files has the following output: file1 file2 file3. I want to have the sum of the sizes but the code below only works for only one file. How can I make it work for […]

Categories
Development

vue.js how to get a value from ‘string + number’ in loop?

oh, i didn’t call from the data(). i called it from API which is in Vuex. sorry. i should’ve changed the codes. <div v-for=”item in this.$store.state.items” :key=”item.id”> <div v-for=”n in 10″ :key=”n”> <div>item.file</div> </div> </div> the api is like this. “file1”:“https://test.com”, “file2”:“https://test1.com”… i want to get the value. ▼this is previous question. I’m struggling with […]

Categories
Development

Batch file: Combine echos into one line

I want to dump all the file names in a folder into without extension into a text file and additionally with them all being in one line separated by commas. So in my folder I have File1.bin File2.bin …. With (for %%a in (.\*.bin) do @echo %%~na,) >Dump.txt I got File1, File2, But what I […]

Categories
Development Linux

how to merge multiple files based on matching of the first two columns?

I am new to linux. I am struggling with a question,how to merge multiple files based on matching of the second column?but keep the first column. For the example the file1, file2,file3,the second column is a sub category of first column, for example, the A has three values, 19 20 23. file1 A 19 0.5 […]