i’m trying to get the ouput from a bash command. If I execute the some command directly in the bash, i see the result. But not with PHP exec() function.. This command try to get a video resolution using ffmpeg lib. The video path it’s fine, I triple check that. Thanks! EDIT: screenshot from the ou…
Prevent entering duplicate records in file using Shell Script
I am creating one sh file in which user enters the roll number, name, subject name and marks. And i am storing it in one text file. Now i don’t want the user to enter the same roll number again. If he enters the same roll number it should throw an message. Here is what i have done: How to
Why not all parameters from ambari cluster not represented by the blueprint json file
Why not all parameters from ambari cluster not represented by the blueprint json file ? I generated the blueprint json file as the foolwing: but when I access to the ambari GUI we noticed that many parameters not appears in the blueprint json file example of parameters from HDFS – config that not appears in t…
How to extract the config from a kernel image file when CONFIG_IKCONFIG is set as a module (=m)?
How do I extract the kernel configuration from a kernel image file? The kernel image file type is: The kernel has been compiled with CONFIG_IKCONFIG enabled. However, returns Note: I am trying the get the config without booting the kernel. Answer If the kernel has been compiled with CONFIG_IKCONFIG=m (note th…
run shell script from php as a specified user
I am trying to run a shell script from a PHP script. PHP code : my shell script : After I run the PHP code in a web server (Xampp), I got this output : Although, I haven’t set any password for the daemon user. And after I checked the current user running the PHP code I found it is
grep issues when using two files – I’ve tried everything
I have two files (recode and reads) that were built and saved with nano command and I want to compare what has on recode to reads and extract the lines in reads that overlaps. I have been trying to create a when loop with the previous logic on mind, but without success so far. The output data is not matching
Overwriting TS Stream File with FFMPEG in Linux
I’m trying to convert rtmp streams to m3u8 stream. To reach that aim I use FFMPEG. Now, there is no problem with converting and downloading. However, it writes lots of .ts file such as channel0000.ts,channel0001.ts,channel0002.ts. Per every 10 seconds, 1 ts file is created. In this point, I want a singl…
How to compile mbed main.c++ and main.h file in Linux eclips to get build files(.elf.hex)
I will be very thankful if someone explain how to use .c++ and .h file in eclips using Ubuntu platform to compile it and get the .elf, .hex and .bin file. I have some files from mbed STM32f4 board. Please guide me Thank you Answer Two options: Build via mbed CLI. After installing set your build command in Ecl…
how to extract only numbers from variable and I need to give spaces between those numbers?
This is the sample string variable: Required output is: 30 45 100 101 1000 I had tried below regex but I did not get proper output: Let me know proper statement for getting above output. Answer Looks like you want the number of numbers in the string. With GNU awk: With GNU grep and wc: Or with sed and `wc
How does `ip netns exec` command create mount namespace?
How does ip netns exec command create a mount namespace and prevent the changes from being propagated to other mount namespaces? Following is the from the man page of ip-netns: For applications that are aware of network namespaces, the convention is to look for global network configuration files first in /etc…