Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: locoroco
2,075
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?
2,293
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...
2,293
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...
450
Posted By locoroco
Answering my own question. for file...
Answering my own question.




for file in folder/*;
do
echo $file
done
450
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?
683
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?
1,511
Posted By locoroco
I'm using ubuntu
I'm using ubuntu
1,511
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
3,183
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
9,587
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
3,183
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...
834
Posted By locoroco
awk - $9 and onwards
How can I get awk to print all fields from $9 and onwards?
680
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
9,587
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
9,587
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.
337
Posted By locoroco
Is there an error in this
I'm trying to upload a jpg file to PiXhost - Free Image Hosting (https://pixhost.to/classic-upload/). The website is seemingly simple. What have I done wrong in the following code, which doesn't...
1,192
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...
1,752
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:

abc<def>ghi<jkl>mno

the result should be:

abcghimno
33,927
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.
1,618
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...
2,769
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"
6,361
Posted By locoroco
Awk, sed - concatenate lines starting with string
I have a file that looks like this:

John Smith
http://www.profile1.com
http://www.profile2.com
http://www.profile3.com
Marc Olsen
http://www.profile4.com
http://www.profile5.com...
1,699
Posted By locoroco
answer
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...
2,793
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.
1,226
Posted By locoroco
Bash - file manipulation
I need to change a file like this:

John Smith;http://www.profile1.com
John Smith;http://www.profile2.com
Frank Olsen;http://www.profile3.com
Frank Olsen;http://www.profile4.com
Into:

John...
Showing results 1 to 25 of 142

 

Featured Tech Videos

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