The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
1k views

.bashrc reports unexpected EOF

I am trying to add some functions to my bashrc, namely: h () { history | fgrep $1 | sort -u | cut -b 8- } extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; ...
3
votes
1answer
1k views

Fix YAML syntax highlighting in VIM

The YAML syntax highlighting in Vim 7.3 isn't great. Putting an apostrophe in a line of text triggers quote highlighting even when there's no quote. The same thing happens in other files sometimes ...
0
votes
1answer
760 views

What's the syntax to add a calendar reminder from Google Command Line?

I've been using googlecl successfully to add events to my calendar. Things like: google calendar add "call Paul tomorrow at 8:30am" work great, and add the appropriate event t the right time. ...
2
votes
2answers
2k views

How to set syntax specific settings in my VIMRC?

I work with several languages and markups in vim every day (ruby, python, javascript, CSS, HTML, etc), and would like to have different settings for each buffer when I fire up my editor. How can I ...
2
votes
2answers
107 views

Make emacs show comments after } else {

This is best described on an example. Let's say you have the following C source file: if (something is true) { meh(); } else if (something else is true) { foo(); } else { // something even ...
3
votes
3answers
4k views

Checkbox in Mediawiki syntax?

Is there a way to insert an HTML checkbox in Mediawiki syntax? <input> doesn't appear on their list of blessed tags, so I can't just insert it. (FWIW, this is for a private documentation page ...
5
votes
4answers
5k views

Explanation of command to uppercase the first letter of a filename

I'm trying to learn to rename files with the command line, and after browsing around a lot of pages I finally found a command that uppercases the first letter of a file, but the problem is that I want ...
4
votes
3answers
2k views

how do I use tar -C on Snow Leopard when creating an archive?

The man page states -C directory In c and r mode, this changes the directory before adding the following files. However, tar does not change to the directory I specify, but instead reports ...
4
votes
2answers
10k views

How can I sort ls by owner and group?

How can I list directories with ls and sort them by their owner and group?
4
votes
1answer
3k views

How to grep a line start with “*” using grep

How can I use 'grep' to get lines start with '* ' in my file? I tried grep "*" myfile and grep "* " myfile but returns all the lines of my file.
2
votes
2answers
14k views

copy file to multiple folders via batch script

I want to copy a file (file.txt) inside all folders of a given destination. I want to create a batch file that does the job, but I'm not so skilled in Windows batch syntax.
11
votes
3answers
4k views

How to read Unix usage

I did some searching, but I cannot find documentation on how Unix usage works. I know something (mostly through trial and error) but, for example, how do I know that /usr/bin/ls ...
80
votes
5answers
32k views

In bash, how do I escape an exclamation mark?

I want to do something like bzr commit -m "It works!". I can sort of escape the exclamation mark by doing bzr commit -m "It works\!". However, then my commit message includes the backslash. How do I ...
0
votes
2answers
451 views

Print the file name with another extension (Batch-program)

Batch-program launchs with 1 parameter (full path to file) program.cmd "C:\Path\To\File\Filename.txt" Now, this program consists of 1 command: echo %1 And it just prints an argument: ...
2
votes
1answer
1k views

Automating Disk Cleanup on Windows using commandline

I am trying to run Disk Cleanup in the Command Prompt (and through a C# program) and so I went through all the available options from this link: http://support.microsoft.com/kb/315246 Whilst I ...
10
votes
5answers
5k views

How is \$ being interpreted by grep?

When I write $ grep \$ then whatever I type on terminal, is matched and printed on terminal. How is \$ being interpreted?
1
vote
3answers
448 views

Ubuntu Crontab error

I want to list files at 12h01. How can I set my crontab to do this? pedro@Pedro-PC:~/PL/trab4$ crontab -l # 01 12 * * * ls -l
0
votes
1answer
3k views

Rotate screen using xrandr on Solaris 10

How do I call the xrandr command? I want to rotate my screen 90 deg. clockwise. Here is the usage: % xrandr -help usage: xrandr [options] where options are: -display <display> or -d ...
6
votes
2answers
3k views

Syntax for find on Mac OS X

I have a project directory that contains source code and subdirectories of source code. I want to use the Unix program find to search recursively for the names of files of certain extensions. The ...
3
votes
10answers
448 views

“Syntax” Highlight a flatfile

I've googled and looked and explored, but it seems most editors configurable syntax highlighting definitions are based on keywords and such. I need one that is based on columns and lines, basically ...
1
vote
3answers
1k views

What is the meaning of pri=42

When mounting a swap partition on Linux, what does the mount option pri=42 mean? fstab: /dev/hda1 swap swap pri=42 0 0