Skip to content
Advertisement

Tag: shell

How to export daily disk space usage?

I am new to scripting. Is it possible to export the disk space usage of a linux server to an excel shell(.csv) sheet daily ? If so, what will be the scripting for that? Answer Use awk to parse df result: Assuming ; is your csv separator, then: gives: In a full script with the date:

Bash: Read in file, edit line, output to new file

I am new to linux and new to scripting. I am working in a linux environment using bash. I need to do the following things: 1. read a txt file line by line 2. delete the first line 3. remove the middle part of each line after the first 4. copy the changes to a new txt file Each line

Download github release with Java/Shell

I want to be able to download a github release (a jar file) and put it in a certain directory on my VPS (running Ubuntu 16.04). How would you go about doing this? Adding the “shell” tag as I think you’d need to use shell Answer See this discussion: Download single files from GitHub In the past, I’ve used something

partial merging 2 text file in linux

I have 2 text file which I want to merge them in a new file. my first file is look like and second file = and my expected output like, I mean mapping part of 9th column string from first line with 1st column of second file, should be like : Also, I wanted to keep line from first file

How can i generate the response file for my binary installable?

I have the binary file to install a component when i am running using ./filename.bin it comes into console mode and asks for language selection and directory selection and all , i tried ./filename.bin -r path/response.properties, help me if anyone knows. Answer as you said that you have already tried using ./filename.bin -r path/response.properties and still it does not work

Bash list datetime between two dates

How to list all datetimes in the format “+%Y-%m-%d %H:%M:%S” ? This only prints the dates, but I want the time included as well i.e. 2016-07-20 08:33:21 Answer Hope this one can help you: Output:

Concatenating file names into string for a function

I’m trying to concatenate a bunch of files into a string so I can use them for a function. As a test script I’m trying to do this: but I’m getting the error: but they are most definitely there can I get some advice please? Answer Change the last line to mv $A ./stuff That should work with files that

Advertisement