12 tags on


  • All Sites

9 answers

How to clear shell buffer in Terminal in Mac OS X?

I know clear command that clears current screen, but the cleared contents just scrolled up. Is there a way to clear all cleared buffer contents? I'm figuring this to prevent scrolling up on Terminal. ...

9 answers | 36 secs ago by Eonil on Stack Overflow
1 answer

Removing specific strings from strings in a file

I want to remove specific fields in all strings in a semi-colon delimited file. The file looks something like this :- texta1;texta2;texta3;texta4;texta5;texta6;texta7 ...

1 answers | 47 secs ago by Abhilipsa Mehra on Stack Overflow
1 answer

Folding code in vim confuse me

I have a question about code folding in Vim. Let's say I open a file and fold some code, then I save it and quit. Later I open the same file, and my folds are gone. Any idea what's going on?

1 answers | 15 mins ago by ryt on Stack Overflow
3 answers

Command equivalents of Unity keyboard shortcuts

I'm wondering is there any way to achieve the affect of the Ctrl-Alt-Keypad shortcuts in Unity using terminal commands instead? I want a command that sets a gui window to half the size of the screen, ...

2 answers

Youtrack Installation, Java not found

I am getting the following error message: Java executable of version 1.7 is not found: - Java executable is not found under the specified directories: 'internal/java/mac-x64', ...

1 answer

bash- command not fount error

I tried to install omnet++ on my Macbook pro (OS 10.10) yesterday. I got an error so I delete path in my bash-profile. Now, every command I try to run in my terminal shows an error of command not ...

3 answers

What's the most elegant way to add Redis to /etc/services?

So today, April 23rd 2015, the Internet Assigned Numbers Authority had decreed the use of port 6379 to Redis, a frabjous day indeed! I wish to com·mem·o·rate this splendid occasion by adding the ...

6 answers

How to detect whether a PHP script is already running?

I have a cron script that executes a PHP script every 10 minutes. The script checks a queue and processes the data in the queue. Sometimes the queue has enough data to last over 10 minutes of ...

6 answers | 2 hours ago by user77413 on Stack Overflow
3 answers

Why is using a shell loop to process text considered bad practice?

Is using a while loop to process text generally considered bad practice in POSIX shells? As Stéphane Chazelas pointed out, some of the reasons for not using shell loop are conceptual, reliability, ...

1 answer

Formatting grep output with awk. Simple case and background case

I'm struggling with this problem. I have this line: mplayer *.* 2>/dev/null | grep Playing which just launchs mplayer and only the line matching Playing filename is printed on screen. This works ...

1 answers | 3 hours ago by the_candyman on Unix & Linux
2 answers

How do I get a count of file references inside a folder of files with those references?

Alright, I have two folders. For simplicity's sake, I'll call them people and animals. The animals folder has a file for each animal, and the people folder has a file for each person with references ...

7 answers

Unix one-liner to swap/transpose two lines in multiple text files?

I wish to swap or transpose pairs of lines according to their line-numbers (e.g., switching the positions of lines 10 and 15) in multiple text files using a UNIX tool such as sed or awk. For example, ...

7 answers | 3 hours ago by Roger on Stack Overflow
0 answers

Xubuntu 12.04: “Open In Terminal” doesn't work

You may be wondering why I'm using an outdated version, that is because my network card doesn't work in 14.04. Anyways, I have set chmod +x (even u+x) to my .sh file, and when I double click, nothing ...

1 answer

How do you configure X11 forwarding over SSH on AIX?

Here is what I've tried. I've edited /etc/ssh/sshd_config on the remote AIX system X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes as well as set $DISPLAY DISPLAY=localhost:10.0 export ...

1 answers | 5 hours ago by ZeroDivide on Server Fault
1 answer

How To Quickly Switch Paths (in Bash)

Sometimes, usually when installing packages with brew, I want to disable/remove certain parts of my path, and then later restore them. I haven't been able to find an easy way to do this, and while I ...

1 answers | 6 hours ago by mchenja on Super User
1 answer

How to automatically answer interactive cli program (not script) with bash script?

I've googled this, and almost all I could find is to answer a bash script and this doesn't work for me. The answers I found told to do: echo "yes" | ./script or ./script <<< yes or ...

2 answers

how to sort by the day of the week?

I have two files. file1: Dave 734.838.9800 Bob 313.123.4567 Carol 248.344.5576 Mary 313.449.1390 Ted 248.496.2204 Alice 616.556.4458 file2: Bob Tuesday Carol Monday Ted Sunday ...

1 answer

Show process status in Web App

My web application is running on WAS. Web application starts another Java program through Shell Script. I am using ProcessBuilder class to execute the Shell Script. Now I have a requirement to ...

1 answer

Linux CLI change price (awk or sed?)

I have price strings formatted as $25.00 in various html files. I would like to use the Linux command line (BASH, presumably with awk or sed) to increase each price by a certain dollar amount ($3 ...

1 answers | 8 hours ago by webmonkey on Stack Overflow
3 answers

“ bash: /usr/bin/mint-fortune: No such file or directory ” - Ubuntu 14.04

Previously i used LMDE on my laptop, but now I moved to Ubuntu. I might have been a little bit rough with it, because I’ve simply format / partition, and installed Ubuntu on it. Home folder was ...

1 answer

Source for sun.awt.AppContext and others?

I attached the that came with my JDK, but it seems to be missing a few files. It's as if I don't have any of the sun.*; packages. I would understand if they maybe got changed out for ...

1 answers | 9 hours ago by Vince Emigh on Stack Overflow
1 answer

Generating a file path

Does anyone know a tool for showing the path from one file to another? Ie, if my css file is in: /User/foo/bar/source/assets/myscreen and my image is in: /User/foo/bar/gamethings/smallimages ...

1 answers | 9 hours ago by fstopzero on Stack Overflow
2 answers

Allocate contiguous memory

I'm trying to allocate a large space of contiguous memory in C and print this out to the user. My strategy for doing this is to create two pointers (one a pointer to double, one a pointer to pointer ...

2 answers | 10 hours ago by The Internet on Stack Overflow
5 answers

How can I edit a range of text between 2 symbols? awk, sed, regex

Using the "*" symbol, (doesn't have to be that one, any special character will do in order to indicate), how can I edit the text from this: *berry straw rasp blue boysen * blahblah blahblah blahblah ...

5 answers | 10 hours ago by user264974 on Ask Ubuntu
1 answer

How to loop a shell script across a specific file in all directories?

Shell Scripting sed Errors: Cannot view /home/xx/htdocs/*/modules/forms/int.php /bin/rm: cannot remove `/home/xx/htdocs/tmp.26758': No such file or directory I am getting an error in my shell ...

1 answers | 10 hours ago by XaxD on Stack Overflow
0 answers

Failed to linking bost_thread on solaris studio

I'm trying to compile and run the simple example of boost thread (see code below), but when I'm trying to run the program always I get "Segmentation Fault (core dumped)". I was compile dan run the ...

2 answers

How to find Shared Memory Limits and Semaphore Limits in Solaris,HP-UX and AIX?

I'm using the following commands to find Shared Memory Limits and Semaphore Limits in Linux. To find Shared Memory Limits I used this command: ipcs -lm and I got the following output: ------ ...

2 answers | 11 hours ago by Kavi Chinna on Stack Overflow
4 answers

bash: colorized man page

Where do I have to take a look at in the system to colorize the man pages? The man pages are viewed with less, so I tried adding the following lines to my .bashrc to change the colors: (Which works ...

4 answers | 11 hours ago by sjas on Super User
1 answer

Using nice on bash (or other) subshell?

Say I'm working on a sluggish system and notice (say via top) that CPU usage is up around 100%, but I don't want to kill the process. If I want to do other work on the machine and just make that ...

1 answers | 12 hours ago by labyrinth on Unix & Linux
1 answer

How does the proc/diskstats work to present that values? And for proc/stat and meminfo?

I am trying to get the diskstats data by same way that the file does. Is there any way to reach that values without reading that file? How the values are placed there? Is there any ".c" file that ...

15 30 50 per page
1 2 3