Posts

Showing posts with the label linux

Bash Script is not working [on hold]

Bash Script is not working [on hold] When i am writing the script like this #!/bin/sh pidof MX-CM48 | xargs kill if [ -f /home/root/MX-CM48NEW ]; then mv /home/root/MX-CM48NEW /home/root/MX-CM48 chmod 777 /home/root/MX-CM48 fi cd /home/root ./MX-CM48 & the script is working. but when i am trying to write it like this: #!/bin/sh NEW_FILE="/home/root/MX-CM48NEW" OLD_FILE="/home/root/MX-CM48" PATH="/home/root" APP_NAME="MX-CM48" pidof $APP_NAME | xargs kill if [ -f $NEW_FILE ]; then mv $NEW_FILE $OLD_FILE chmod 777 $OLD_FILE fi cd $PATH ./$APP_NA...

Installing Gnuplot 5.0 on Ubuntu

Installing Gnuplot 5.0 on Ubuntu I have been trying to install Gnuplot 5.0 from source on Ubuntu. I followed the procedure given in the blog: Installing gnuplot from source I used the following commands: tar xzf gnuplot-5.0.0.tar.gz mkdir build cd build ../gnuplot-5.0.0/configure --with-readline=gnu make Everything until the configure command works fine. However, I end up getting the following error when I run the make command: In file included from ../../gnuplot-5.0.0/src/qtterminal/QtGnuplotWindow.cpp:187:0: ./ui_QtGnuplotSettings.h:13:25: fatal error: QtGui/QAction: No such file or directory #include <QtGui/QAction> Could someone guide on how to fix this issue? If there is an alternative easier way to install gnuplot 5.0.0. that would be helpful as well. Did you install qtbase5-dev ? Or any other qt library component? – Willem Van Onsem Apr 8 '15 at 22:03 ...

How do I write a script to identify and manipulate a specific drive in the terminal?

How do I write a script to identify and manipulate a specific drive in the terminal? I'm trying to write a short script that can automatically unmount and remount a partition, without knowing where the drive is currently mounted. The following command sort of works for me: sudo umount /dev/sdX sudo mount -t ntfs /dev/sdX /mnt/rec The issue is, I'm running Linux live, and can't install it on my hard drive. As such, whenever I reboot the computer, /dev/sdX will sometimes mount as /dev/sdb, or /dev/sdd. As such, I can't just run a script to automatically mount the drive where I need to, without using sudo fdisk -l In order to verify what the drives are currently mounted as. My question is: Is there a way to identify a drive, that's agnostic to where it's currently mounted? What does it mean to identify the drive independent of where it is mounted? What's on the drive to tell you it is the one you're after? – ...

How could I make a “trebble boost” from command line in Linux? [on hold]

Image
How could I make a “trebble boost” from command line in Linux? [on hold] Like a audacity command How can do this with sox or another software? Please help. This question appears to be off-topic. The users who voted to close gave this specific reason: You should ask a specific question for a particular problem. Since Stack Overflow hides the Close reason from you: "Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question." – jww Jul 1 at 1:03

Python install Snack - Error 'x86_64-linux-gnu-gcc' failed with exit status 1

Python install Snack - Error 'x86_64-linux-gnu-gcc' failed with exit status 1 I want to use the package Snack to play a audio file in a Python program. Snack I have tried installing it with pip , but I keep getting the error: pip 'x86_64-linux-gnu-gcc' failed with exit status 1 What do I do now? And also: are there any other recomended packages for doing this kind of thing (audio in python)? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Linux 'grep' only highlights but doesn't filter [duplicate]

Linux 'grep' only highlights but doesn't filter [duplicate] This question already has an answer here: question is in the title. I'm trying to perform "du -sh * | grep '^[0-9]'" on my root dir to filter out any ... cannot access ..., but my console will just color matches and print out everything. Thanks for any help This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 1 Answer 1 When you run a command, it will always open 3 files: stdin (keyboard input), stdout (command output) and stderr (command output for error messages), these are numbered from 0 to 2. stdin stdout stderr Those error messages from du are written to stderr , while the normal output is written to stdout . This allows you to redirect the error messages to /dev/null. This makes the error messages disappe...