Search Results

Search found 4482 results on 180 pages for 'mr bash'.

Page 2/180 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Ubuntu - Bash - How to Ctrl + R

    - by Greg_the_Ant
    I can't seem to locate recent commands I've run when I do Ctrl + R in my terminal, nor can I see them when I hit the up arrow. It was a long command. Is there a length limit to what is stored? I may have used sudo. Is sudo history stored somewhere else? If so how do I access it? Much thanks for any insight.

    Read the article

  • Error while running bash script that moves files

    - by K.K Patel
    I am new to bash scripting and want to create bash script that moves some days old files between source and destination as per days defined in script. When I run this script I get error line 16: syntax error near unexpected token `do' #!/bin/bash echo "Enter Your Source Directory" read soure echo "Enter Your Destination Directory" read destination echo "Enter Days" read days do find $soure -mtime +$days mv $soure $destination {} \; echo "Files $days old moved from $soure to $destination" done please help me to create this script.

    Read the article

  • Typing commands into a terminal always returns "-bash: /usr/bin/python: is a directory"

    - by Artur Sapek
    I think I messed something up on my Ubuntu server while trying to upgrade to Python 2.7.2. Every time I type in a command that doesn't have a response, the default from bash is this: -bash: /usr/bin/python: is a directory Just like it would say if I typed the name of a directory. But this happens every time I enter a command that doesn't do anything. artur@SERVER:~$ dslkfjdsklfdshjk -bash: /usr/bin/python: is a directory I remember messing with the update-alternatives to point at python at some point, perhaps that could be it? Any inklings as to why this is happening? Related to this problem is also the fact that when I try using easy_install it tells me -bash: /usr/bin/easy_install: /usr/bin/python: bad interpeter: Permission denied /etc/fstab/ is set to exec. I've read that could fix the second problem but it hasn't.

    Read the article

  • Terminal error messages: bash: /dev/cgroup/cpu/user/2823/tasks: No such file or directory

    - by sasaenator
    This is what I get when I start up the terminal: bash: /dev/cgroup/cpu/user/2823/tasks: No such file or directory bash: /dev/cgroup/cpu/user/2823/notify_on_release: No such file or directory bash: /dev/cgroup/cpu/user/2823/tasks: No such file or directory bash: /dev/cgroup/cpu/user/2823/notify_on_release: No such file or directory sasa@sasa:~$*** I reinstalled 10.10 yesterday because of other problems, I didn't have this error message before. I have a separate /home partition, and new installation picked up almost all of the old settings, also those which I don't like, but it looks like that is not a problem or maybe I am wrong? Wouldn't ask if I knew! :) I'll be glad to post more info if someone needs it!

    Read the article

  • Bash script not working as required with xbindkeys

    - by RanRag
    I made a simple bash script to display a notification whenever my capslock key is pressed. It works fine when I call it like bash capsnotify.sh. The problem now is when I bind my above script to capslock key using xbindkeys tool it doesn't work as required. It shows a notification caps ON when my caps is on but it doesn't show caps OFF notification when my caps is off instead it again shows the caps ON notification. capsnotify.sh #!/bin/bash value=$(xset -q | awk '/Caps/ {print $4}') if [ "$value" == "on" ] then notify-send "caps ON" elif [ "$value" == "off" ] then notify-send "caps OFF" fi .xbindkeysrc "bash /home/ranveer/capsnotify.sh" m:0x2 + c:66 So, the problem is after binding my caps lock key on both events(on/off) it shows caps ON notification.

    Read the article

  • Mr Flibble: As Seen Through a Lens, Darkly

    - by Phil Factor
    One of the rewarding things about getting involved with Simple-Talk has been in meeting and working with some pretty daunting talents. I’d like to say that Dom Reed’s talents are at the end of the visible spectrum, but then there is Richard, who pops up on national radio occasionally, presenting intellectual programs, Andrew, master of the ukulele, with his pioneering local history work, and Tony with marathon running and his past as a university lecturer. However, Dom, who is Red Gate’s head of creative design and who did the preliminary design work for Simple-Talk, has taken the art photography to an extreme that was impossible before Photoshop. He’s not the first person to take a photograph of himself every day for two years, but he is definitely the first to weave the results into a frightening narrative that veers from comedy to pathos, using all the arts of Photoshop to create a fictional character, Mr Flibble.   Have a look at some of the Flickr pages. Uncle Spike The B-Men – Woolverine The 2011 BoyZ iN Sink reunion tour turned out to be their last Error 404 – Flibble not found Mr Flibble is not a normal type of alter-ego. We generally prefer to choose bronze age warriors of impossibly magnificent physique and stamina; superheroes who bestride the world, scorning the forces of evil and anarchy in a series noble and righteous quests. Not so Dom, whose Mr Flibble is vulnerable, and laid low by an addiction to toxic substances. His work has gained an international cult following and is used as course material by several courses in photography. Although his work was for a while ignored by the more conventional world of ‘art’ photography they became famous through the internet. His photos have received well over a million views on Flickr. It was definitely time to turn this work into a book, because the whole sequence of images has its maximum effect when seen in sequence. He has a Kickstarter project page, one of the first following the recent UK launch of the crowdfunding platform. The publication of the book should be a major event and the £45 I shall divvy up will be one of the securest investments I shall ever make. The local news in Cambridge picked up on the project and I can quote from the report by the excellent Cabume website , the source of Tech news from the ‘Cambridge cluster’ Put really simply Mr Flibble likes to dress up and take pictures of himself. One of the benefits of a split personality, however is that Mr Flibble is supported in his endeavour by Reed’s top notch photography skills, supreme mastery of Photoshop and unflinching dedication to the cause. The duo have collaborated to take a picture every day for the past 730-plus days. It is not a big surprise that neither Mr Flibble nor Reed watches any TV: In addition to his full-time role at Cambridge software house,Red Gate Software as head of creativity and the two to five hours a day he spends taking the Mr Flibble shots, Reed also helps organise the . And now Reed is using Kickstarter to see if the world is ready for a Mr Flibble coffee table book. Judging by the early response it is. At the time of writing, just a few days after it went live, ‘I Drink Lead Paint: An absurd photography book by Mr Flibble’ had raised £1,545 of the £10,000 target it needs to raise by the Friday 30 November deadline from 37 backers. Following the standard Kickstarter template, Reed is offering a series of rewards based on the amount pledged, ranging from a Mr Flibble desktop wallpaper for pledges of £5 or more to a signed copy of the book for pledges of £45 or more, right up to a starring role in the book for £1,500. Mr Flibble is unquestionably one of the more deranged Kickstarter hopefuls, but don’t think for a second that he doesn’t have a firm grasp on the challenges he faces on the road to immortalisation on 150 gsm stock. Under the section ‘risks and challenges’ on his Kickstarter page his statement begins: “An angry horde of telepathic iguanas discover the world’s last remaining stock of vintage lead paint and hold me to ransom. Gosh how I love to guzzle lead paint. Anyway… faced with such brazen bravado, I cower at the thought of taking on their combined might and die a sad and lonely Flibble deprived of my one and only true liquid love.” At which point, Reed manages to wrestle away the keyboard, giving him the opportunity to present slightly more cogent analysis of the obstacles the project must still overcome. We asked Reed a few questions about Mr Flibble’s Kickstarter adventure and felt that his responses were worth publishing in full: Firstly, how did you manage it – holding down a full time job and also conceiving and executing these ideas on a daily basis? I employed a small team of ferocious gerbils to feed me ideas on a daily basis. Whilst most of their ideas were incomprehensibly rubbish and usually revolved around food, just occasionally they’d give me an idea like my B-Men series. As a backup plan though, I found that the best way to generate ideas was to actually start taking photos. If I were to stand in front of the camera, pull a silly face, place a vegetable on my head or something else equally stupid, the resulting photo of that would typically spark an idea when I came to look at it. Sitting around idly trying to think of an idea was doomed to result in no ideas. I admit that I really struggled with time. I’m proud that I never missed a day, but it was definitely hard when you were late from work, tired or doing something socially on the same day. I don’t watch TV, which I guess really helps, because I’d frequently be spending 2-5 hours taking and processing the photos every day. Are there any overlaps between software development and creative thinking? Software is an inherently creative business and the speed that it moves ensures you always have to find solutions to new things. Everyone in the team needs to be a problem solver. Has it helped me specifically with my photography? Probably. Working within teams that continually need to figure out new stuff keeps the brain feisty I suppose, and I guess I’m continually exposed to a lot of possible sources of inspiration. How specifically will this Kickstarter project allow you to test the commercial appeal of your work and do you plan to get the book into shops? It’s taken a while to be confident saying it, but I know that people like the work that I do. I’ve had well over a million views of my pictures, many humbling comments and I know I’ve garnered some loyal fans out there who anticipate my next photo. For me, this Kickstarter is about seeing if there’s worth to my work beyond just making people smile. In an online world where there’s an abundance of freely available content, can you hope to receive anything from what you do, or would people just move onto the next piece of content if you happen to ask for some support? A book has been the single-most requested thing that people have asked me to produce and it’s something that I feel would showcase my work well. It’s just hard to convince people in the publishing industry just now to take any kind of risk – they’ve been hit hard. If I can show that people would like my work enough to buy a book, then it sends a pretty clear picture that publishers might hear, or it gives me the confidence enough to invest in myself a bit more – hard to do when you’re riddled with self-doubt! I’d love to see my work in the shops, yes. I could see it being the thing that someone flips through idly as they’re Christmas shopping and recognizing that it’d be just the perfect gift for their difficult to buy for friend or relative. That said, working in the software industry means I’m clearly aware of how I could use technology to distribute my work, but I can’t deny that there’s something very appealing to having a physical thing to hold in your hands. If the project is successful is there a chance that it could become a full-time job? At the moment that seems like a distant dream, as should this be successful, there are many more steps I’d need to take to reach any kind of business viability. Kickstarter seems exactly that – a way for people to help kick start me into something that could take off. If people like my work and want me to succeed with it, then taking a look at my Kickstarter page (and hopefully pledging a bit of support) would make my elbows blush considerably. So there is is. An opportunity to open the wallet just a bit to ensure that one of the more unusual talents sees the light in the format it deserves.  

    Read the article

  • Running a .bash file in Eclipse

    - by Anne Ambe
    I know this is really an Eclipse issue but I can't seem to login in their forum. I am running eclipse juno for some c/c++ development.However, I wrote a .bash script that initiate the entire program.As input argument to this script, I have a a configuration file which is one directory lower than the .bash file. In terminal I just do: ./startenb.bash ./CONF/ANNE it runs just fine. How can I configure the external tools in eclipse to take this file path as input argument? Any help or old thread vaguely addressing this issue is highly welcome.

    Read the article

  • Calling Grep inside Java gives incorrect results when calling grep in shell gives correct results.

    - by futureelite7
    I've got a problem where calling grep from inside java gives incorrect results, as compared to the results from calling grep on the same file in the shell. My grep command (called both in Java and in bash. I escaped the slash in Java accordingly): /bin/grep -vP --regexp='^[0-9]+\t.*' /usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/saccitic/237482319867147879_1271411421 The command is supposed to match and discard strings like these: 85295371616 Hi Mr Lee, please be informed that... My input file is this: 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 The commands works when I call it from inside bash (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85219299222 However, when I call grep again inside java, I get the entire file (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 What could be the problem that will cause the grep called by Java to return incorrect results? I tried passing local information via the environment string array in runtime.exec, but nothing seems to change. Am I passing in the locale information incorrectly, or is the problem something else entirely? private String[] localeArray = new String[] { "LANG=", "LC_COLLATE=C", "LC_CTYPE=UTF-8", "LC_MESSAGES=C", "LC_MONETARY=C", "LC_NUMERIC=C", "LC_TIME=C", "LC_ALL=" };

    Read the article

  • Calling Grep inside Java gives incorrect results while calling grep in shell gives correct results.

    - by futureelite7
    I've got a problem where calling grep from inside java gives incorrect results, as compared to the results from calling grep on the same file in the shell. My grep command (called both in Java and in bash. I escaped the slash in Java accordingly): /bin/grep -vP --regexp='^[0-9]+\t.*' /usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/saccitic/237482319867147879_1271411421 Java Code: String filepath = "/path/to/file"; String options = "P"; String grepparams = "^[0-9]+\\t.*"; String greppath = "/bin/"; String[] localeArray = new String[] { "LANG=", "LC_COLLATE=C", "LC_CTYPE=UTF-8", "LC_MESSAGES=C", "LC_MONETARY=C", "LC_NUMERIC=C", "LC_TIME=C", "LC_ALL=" }; options = "v"+options; //Assign optional params if (options.contains("P")) { grepparams = "\'"+grepparams+"\'"; //Quote the regex expression if -P flag is used } else { options = "E"+options; //equivalent to calling egrep } proc = sysRuntime.exec(greppath+"/grep -"+options+" --regexp="+grepparams+" "+filepath, localeArray); System.out.println(greppath+"/grep -"+options+" --regexp="+grepparams+" "+filepath); inStream = proc.getInputStream(); The command is supposed to match and discard strings like these: 85295371616 Hi Mr Lee, please be informed that... My input file is this: 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 The commands works when I call it from inside bash (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85219299222 However, when I call grep again inside java, I get the entire file (Results below): 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85aaa234567 Hi Ms Chan, please be informed that... 85292vx5678 Hi Mrs Ng, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 8~!95371616 Hi Mr Lee, please be informed that... 85295371616 Hi Mr Lee, please be informed that... 852&^*&1616 Hi Mr Lee, please be informed that... 8529537Ax16 Hi Mr Lee, please be informed that... 85====ppq16 Hi Mr Lee, please be informed that... 85291234783 a3283784428349247233834728482984723333 85219299222 What could be the problem that will cause the grep called by Java to return incorrect results? I tried passing local information via the environment string array in runtime.exec, but nothing seems to change. Am I passing in the locale information incorrectly, or is the problem something else entirely?

    Read the article

  • How to launch git bash window with particular working directory using a script?

    - by holocronweaver
    How can I launch a new Git Bash window with a specified working directory using a script (either bash or Windows batch)? My goal is to launch multiple Git Bash windows from a single script, each Bash terminal set to a different working directory. This way I can quickly get to work after booting computer instead of having to open Git Bash windows and navigating each one to the correct working directory.

    Read the article

  • Run simple bash script to start applications at login

    - by ganjan
    I want to run a simple bash script automatically when I log in. For example #!/bin/bash echo "start spotify" gnome-terminal -e spotify --title spotify When I run this command, one gnome-terminal shows up and spotify show up. I also want the gnome-terminal to popup "hidden" in a different virtual desktop. (one of the other four virtual desktops you can choose from taskbar) I tried to add this to /home/me/.bash_login or something, but that didn't work..

    Read the article

  • Overwrite previous output in Bash instead of appending it

    - by NES
    For a bash timer i use this code: #!/bin/bash sek=60 echo "60 Seconds Wait!" echo -n "One Moment please " while [ $sek -ge 1 ] do echo -n "$sek " sleep 1 sek=$[$sek-1] done echo echo "ready!" That gives me something like that One Moment please: 60 59 58 57 56 55 ... Is there a possibility to replace the last value of second by the most recent so that the output doesn't generate a large trail but the seconds countdown like a real time at one position? (Hope you understand what i mean :))

    Read the article

  • Help with Bash script

    - by Andrew
    #!/bin/bash if [ "$(Which gimp)" != ""] then { if [ "$(gimp -version)" != 2.8 ] then { sudo apt-get remove gimp sudo add-apt-repository ppa:otto-kesselgulasch/gimp sudo apt-get update sudo apt-get install gimp } else echo You already have gimp 2.8 fi } else { sudo add-apt-repository ppa:otto-kesselgulasch/gimp sudo apt-get update sudo apt-get install gimp } fi I am trying to make a gimp 2.8 installer in bash Please help me?

    Read the article

  • How to write Bash scribt to open two different terminals

    - by Ahmed Zain El Dein
    How to write Bash script to open two different taped terminal ,and write in both of them commands separately to be executed unrelationally for instance : Terminal number one open skype terminal number two open in the end , i want one more thing , can i write in the bash script my skype username and password to put them in skype when open it in terminal one automatically then login too Thanks

    Read the article

  • Bash script won't stay open in background after running through while

    - by jfreak53
    I can't get the following bash script to stay open after the first message is received from NC: #!/bin/bash port=3333 nc -l $port | while read msg; do notify-send Alert "$msg"; done After the first message it exits. I want it to stay open and continue monitoring for new messages from NC. I know that if I launch nc -l port without the while loop it stays open and I can chat away between the two connections even disconnect from the connected host. I am sending the message using: echo 'done' | nc IP port

    Read the article

  • lower-case 'c' key not working in bash

    - by gavin
    This is a bit of a strange one. I'm running Ubuntu 12.04. It's been working well but today, I ran into a hell of strange phenomenon. I can no longer type a lower-case 'c' in bash. At first I thought it was a misconfiguration for the gnome terminal but I tried both a stock xterm and directly at the console (ctrl+alt+F1) and the issue was the same. I can type an upper-case C without any difficulty and I can type lower-case 'c' in any other terminal based program (vim, bash, less, etc.). The lower 'c' also works if I jump into plain old sh. I looked at all the configuration files I know of and haven't found anything incriminating in there. I suspect it's not going to be that simple anyway because if I run bash with the '--norc' option from within sh, the problem remains. I don't know what else to check. In fact, if I wanted to cause this problem on a given machine, I have no idea how it could be done. Total mystery.

    Read the article

  • Sed problem in a Bash script

    - by moata_u
    Hello there. I'm having a problem using the sed command . I'm trying to write a bash script that does the following : search for the line that contain :@ then save the line that contained :@ and replace it with new line as in the following: #! /bin/bash echo "Please enter the ip address of you file"<br> read ipnumber<br> find=`grep ':@' application.properties` # find the line<br> input="connection.url=jdbc\racle\:thin\:@$ipnumber\:1521\:billz" # preparing new line<br> echo `sed "s/'${find}'/'${input}'/g" application.properties` # replace old with new line <br> The problem is: nothing happens. I've already tried to use "${find}" instead of '${find}'

    Read the article

  • BASH Scripting: Check If running with sudo/superuser, if not, dont run, return error

    - by EvilPhoenix
    This is something I've been curious about. I make a lot of small bash scripts (.sh files) to do tasks that I routinely do. Some of those tasks require everything to be ran as superuser. I've been curious: Is it possible to, within the BASH script prior to everything being run, check if the script is being run as superuser, and if not, print a message saying You must be superuser to use this script, then subsequently terminate the script itself. The other side of that is I'd like to have the script run when the user is superuser, and not generate the error. Any ideas on coding (if statements, etc.) on how to execute the aforementioned?

    Read the article

  • How do I create a permanent Bash alias?

    - by Bakhtiyor
    I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the terminal. As it is explained here to save alias permanently I need to execute ~/.bash_aliases or ~/.bashrc commands in terminal and add my alias there. But when I execute ~/.bashrc I get following error message : bash: /home/bakhtiyor/.bashrc: Permission denied When I run ~/.bash_aliases I get another error message like this: bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist. What is the actual problem and how can I solve it?

    Read the article

  • How do I log into bash shell only?

    - by Tom D
    On my home desktop I want to use Ubuntu Unity sometimes and just the bash shell (without any gui) other times. Is it possible to set up a login option where I can choose between using the Unity GUI or just the shell? For example, on the Ubuntu login screen I can choose among Unity, Gnome Shell, XFCE, etc. An option there for just the Bash shell command line would be ideal. I'm not trying to invite "why would you do that" debate here. I have my reasons. Thanks.

    Read the article

  • Retrieve a command from another, remote bash session

    - by Oli
    So I was on our laptop, SSH'd into my desktop, dropping some mad bashfu skill. There was one command I ran which was particularly skilful. I'm now about minute walk from the laptop and I really want that command here on my desktop, so that I can run it again. I realise I've already spent more time that it would have taken to rewrite it, but this has raised a common issue I have with bash history. I know I can force it to update each command, but I haven't... so: Is there any way to get a history from a different, live bash session?

    Read the article

  • Prevent nautilus showing partition mounted in bash script

    - by bcbc
    In my bash script I mount partitions, check them, copy files to them, and unmount. When the script mounts the partition, Nautilus pops up with a Window showing the partition and stealing focus. This is something I want to avoid. Note: I know I can change the behaviour of this in System settings, Details, Removable media, Never prompt or start programs on media insertion, but I don't want to change the behaviour e.g. if a USB stick is plugged in, I just want to prevent it in my bash script. Actually this auto display doesn't seem consistent. If I do the exact same command from the terminal, Nautilus doesn't show, and I know there are other mounts in my script that don't show. So what could be causing this? Here's an example of the code: mkdir -p $target/home mount $target/home $homedev Thanks in advance

    Read the article

  • build command by concatenating string in bash

    - by Lennart Rolland
    I have a bash script that builds a command-line in a string based on some parameters before executing it in one go. The parts that are concatenated to the command string are supposed to be separated by pipes to facilitate a "streaming" of data through each component. A very simplified example: #!/bin/bash part1=gzip -c part2=some_other_command cmd="cat infile" if [ ! "$part1" = "" ] then cmd+=" | $part1" fi if [ ! "$part2" = "" ] then cmd+=" | $part2" fi cmd+="> outfile" #show command. It looks ok echo $cmd #run the command. fails with pipes $cmd For some reason the pipes don't seem to work. When I run this script i get different error messages relating usually to the first part of the command (before the first pipe). So my question is whether or not it is possible to build a command in this way, and what is the best way to do it?

    Read the article

  • C code - ls system command not showing bash colors

    - by m0atz
    I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include <stdio.h> int main (void) { system("ls -l -d */"); printf("I've just listed the directories :-)\n"); return 0; } This runs fine, but it shows the ls output in monochrome, whereas Bash would output the list using colors for the directories (or files if I included files). How can I make my C code use the bash colors? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >