Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: locoroco
Posted By locoroco
Check if file exists
I need to check whether a file exists and has been changed.

The file should contain a specific string. The file should also have been changed within the last ten seconds.

How do I do that?
Posted By locoroco
Answering my own question. Here I have chosen to...
Answering my own question. Here I have chosen to scale from height. It is also possible to scale from width.

height=$(ffprobe -v quiet -show_entries stream=width,height -of...
Posted By locoroco
Change size of watermark
I'm using this code to watermark images (add a logo). How do I change the size of the watermark to cover a certain percentage of the image

ffmpeg -i folder/s886_01.jpg -i watermark.png...
Posted By locoroco
Answering my own question. for file...
Answering my own question.

for file in folder/*;
echo $file
Posted By locoroco
Action on all files in a folder
How can I do an action to all files in a specific folder?

Do I use ls and a loop or something else? Does ls take folder location?
Posted By locoroco
Length of video file in minutes
I need to extract the length of a video file in minutes, not seconds or hours.

How do I get the amount of minutes exclusively?
Posted By locoroco
I'm using ubuntu
I'm using ubuntu
Posted By locoroco
Join two video files with different properties
I need to join two video files file1 and file2.

File1 has to be converted to get the properties of file2 and then the two are supposed to be joined together into one file.

If the properties...
Forum: Web Development 03-24-2019
Posted By locoroco
I want to extract the name itself to a variable....
I want to extract the name itself to a variable. The -O option doesn't do that. I can't attach the name to a variable because I don't know it.

I'm not sure if the ls -lat is a good way.
Forum: Web Development 03-24-2019
Posted By locoroco
I'm creating login, download and upload scripts...
I'm creating login, download and upload scripts for different websites, and have become curious during the process.

I'm not in conflict with anyone's permission.
Forum: Web Development 03-24-2019
Posted By locoroco
Filename output in curl
How can I get the name of the default output filename from curl using the argument -O?

Using -o one can choose a filename. I want to get the name of the original file, but don't understand how...
Posted By locoroco
awk - $9 and onwards
How can I get awk to print all fields from $9 and onwards?
Posted By locoroco
Remove first line of file
How can I use bash to remove the first line of a file?
Forum: Web Development 03-24-2019
Posted By locoroco
Wget and curl sometimes don't show the same...
Wget and curl sometimes don't show the same content as web browsers. The parts generated by javascript don't seem to be included in wget and curl.
Forum: Web Development 03-23-2019
Posted By locoroco
Wget/curl and javascript
What can I use instead of wget/curl when I need to log into websites that use javascript?

Wget and curl don't handle javascript.
Posted By locoroco
Is there an error in this
I'm trying to upload a jpg file to PiXhost - Free Image Hosting ( The website is seemingly simple. What have I done wrong in the following code, which doesn't...
Posted By locoroco
Sorting a list
I am trying to sort a list

If you walk through the list, every you have passed both website1 and website2 and get back to website1, the last lines should be collected into one line and the process...
Posted By locoroco
Remove everything inside of brackets
I need to use something bash related to remove everything inside of brackets.

For example. In the following:


the result should be:

Posted By locoroco
Bash - remove duplicates without sort
I need to use bash to remove duplicates without using sort first.

I can not use:
cat file | sort | uniq

But when I use only

cat file | uniq

some duplicates are not removed.
Posted By locoroco
Wait until firefox has finished
I am running a macro script from the command line. But the script doesn't wait until the task has finished.

firefox imacros://run/?m=macro_script.iim
firefox imacros://run/?m=macro_script2.iim...
Posted By locoroco
awk field separator
I need to set awk field separator to ";", but I need to avoid ";EXT".

so that

echo a;b;c;EXTd;e;f | awk -F";" '{print $3}'
would give "c;EXTd"
Posted By locoroco
Awk, sed - concatenate lines starting with string
I have a file that looks like this:

John Smith
Marc Olsen
Posted By locoroco
The last dot is a wildcard that could be any symbol. The $ is the end of the line. The "\." is a dot, as you have correctly understood.

sed 's/\..$//g' file

If you only want dot-number and not...
Posted By locoroco
Awk/sed - add space between dot and letter
I need to change [A-Z].[A-Z] into [A-Z]. [A-Z]so that e.g.
A.Jbecomes A. JI have tried sed 's/[A-Z]\.[A-Z]/[A-Z]\.\ [A-Z]/g' but that didn't work.
Posted By locoroco
Bash - file manipulation
I need to change a file like this:

John Smith;
John Smith;
Frank Olsen;
Frank Olsen;

Showing results 1 to 25 of 142


Featured Tech Videos

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