How would I get just the current working directory name in a bash script, or even better, just a terminal command.
pwd gives the full path of the current working directory, e.g. '/opt/local/bin' but I only want 'bin'
...
Hi!
I'm writing a small application in C that reads a simple text file and then outputs the lines one by one. The problem is that the text file contains special characters like Æ, Ø and Å among others. When I run the program in terminal the output for those characters are represented with a "?".
Is there an easy fix?
...
Hey guys,
Does anyone link to download the exact terminal icon from terminal?
Thanks,
Kevin
...
I love cocoa style keyboard shortcuts and am constantly frustrated that Terminal doesn't behave in the same way. Does anyone know how to set common cocoa-style keyboard shortcuts in Terminal.app?
I found a blog post that describes how to do this in iTerm: http://blog.jcoffin.com/2008/12/06/mac-keyboard-shortcuts-iterm/. However, I like...
Debian's apt tool outputs results in uniform width columns. For instance, try running "aptitude search svn" .. and all names appear in the first column of the same width.
Now if you resize the terminal, the column width is adjusted accordingly.
Is there a Python library that enables one to do this? Note that the library has to be aware...
I would like a Java program to have different default settings (verbosity, possibly colored output where supported) depending on its use. In C, there is an isatty() function which will return 1 if a file descriptor is connected to a terminal, and 0 otherwise. Is there an equivalent for this in Java? I haven't seen anything in the JavaDoc...
I would like to write a simple C program that will perform different actions based on both "key down" and "key up" events. This program will be run from inside rxvt.
What library or mechanism should I use to access both key presses and releases? Is it true that reading /dev/tty will only provide key releases? Is this also true for termc...
I got this far:
:~ curl -u username:password -d status="new_status" http://twitter.com/statuses/update.xml
Now, how can I alias this with variables so I can easily twit from Terminal? How can I make the alias working through different sessions (when I close Terminal aliases reset).
Thanks!
...
What is the difference between using an environment variable, like PATH, as $PATH or ${PATH}?
...
I'm using a Google phone running Android, and I need to figure out how to use the terminal's
'ip' command.
I found out that Android uses BusyBox in its terminal, but I can't find any help or tutorials or any information regarding it other than the basic information given in the terminal help. Can anyone point me to a site that would g...
I have seen this thread on how to execute terminal commands from within a Cocoa app. But I want to actually launch Terminal.app to a specified directory.
I know that the following does not work:
[[NSWorkspace sharedWorkspace] openFile:folderPath withApplication:@"Terminal"];
Terminal tries to actually open the folder as a file.
Is t...
Is there a parallel command to Linux's LDCONFIG for Mac OS X's Terminal?
...
I want to include in a script a check for a file input to see if the file/folder has a color set and if it does, which one... (I don't need help with the creation of this script, just need the command to check what color the label is).
eg, like these colors (grey):
http://img.skitch.com/20090923-t1xsphn47tdq64b8ksb43wh3e8.png
I would l...
I've been using the Perl solution for Twitter via Terminal: IRSSI + TWIRSSI for the past couple of days. Amazing. The feeling so nostalgic yet so futuristic; beautiful. However, one problem still stands: Hebrew letters result as gibberish:
Any idea how or where to I can modify the script to work in a readable Hebrew?
Thanks, and G*d ...
I have a macbook I'm trying to do some development on. I have a program I want to build, and when I went to use make to build it I got a "command not found" error. I did some google and SO searches and it doesn't look like this is a common problem. Why don't I have make installed and how do I get it? I'm extra confused because I know I u...
Assume for a moment that one cannot use print (and thus enjoy the benefit of automatic encoding detection). So that leaves us with sys.stdout. However, sys.stdout is so dumb as to not do any sensible encoding.
Now one reads the Python wiki page PrintFails and goes to try out the following code:
$ python -c 'import sys, codecs, locale; ...
The problem is that, well, it's C++. The way I've created them makes it such that they've always been run via a terminal/console window and wait for user input or else simply take a sample input and run with that. The output has also always been to the terminal screen or sometimes to a file. I'm not quite sure how I could take all of ...
Hi,
I used MacPorts shell to download and install WordPress:
port install wordpress
It went just fine:
---> Computing dependencies for libxml2
---> Fetching libxml2
---> Attempting to fetch libxml2-2.7.5.tar.gz from http://arn.se.distfiles.macports.org/libxml2
---> Verifying checksum(s) for libxml2
---> Extracting libxml2
--->...
Hi!
My (potential) customer is using Windows Server 2003 and students computers are just terminals.
My application relies heavily in Microsoft Agent technology and now customer is complaining that the application gives errors about "not supported".
I wonder if it would help if MS Agent would be installed into local computers - does it ...
We have a client who has requested a new project with development to be done on a CREON terminal (Spectra Technologies). Can anyone recommend some good resources about terminal and in particular CREON development. Or know of a reputable development team specializing in CREON development. I have done a fair bit of googling / binging wi...