\resizebox{.5\columnwidth}{!}{$e^{\imath \pi} = -1$}
I can't see how to use the equation environment and shrink it but there probably is a way...
\begin{pgfpicture}
\pgfputat{\pgfxy(5.5,-1.5)}{\pgfbox[left,base]{\pgfimage[width=2in]{Figures/basicsystem0823}}}
\end{pgfpicture}
where coordinates are 0 - 11cm x, 0 - -7cm y
grep -i 'pattern' filename.txt
The -i switch makes the test insensitive to case.
The -c switch counts matching lines and outputs a number instead of printing them.
The -n switch prints line numbers as well.
I don't think the single quotes are necessary, but they don't hurt in unix anyway.
The pattern can include regular expression characters. For example,
grep '\Wact...tta' TAG4masterkey.txtmatches lines that have whitespace followed "act", then any three characters, then "tta", and
grep '\Wact.*tta\W' TAG4masterkey.txtmatches lines where there is whitespace followed by "act" followed by any number of characters followed by "tta" followed by whitespace.
can also grep across multiple files; for instance to search all files 3 levels in for a command save which starts a line use\
grep '^save' */*/*
du -sk *will give you the sum (-s) size in KB (-k) for each file in the current directory (*) (get recursive listing by leaving out the -s)
wc tmp.txtwill give the number of lines, words, and bytes in the file
ls *.dat | wc -l *will give you the number of lines output by ls, or the number of matching files
find-name " "
Example:
find . -name "*.pdf"will find all the PDF files in the current directory and subdirectories.
To find large files:
du -ksL * | sort -nr
find / -name \*.log -exec rm {} \;
To optionally delete all files ending with .tmp in the /var filesystem:
find /var -name \*.tmp -ok rm {} \;
To remove an entire directory (named testing) recursively without having to delete files sitting in them:
rm -R testing/
gzip -d <filename>To undo a tar:
tar -xvf <filename>To zip a file:
gzip <filename>To create a tar:
tar -pcf <archive name> <directory>
rename 's/c1_/my_/' *.bak
if($str =~ m/.*\.dat/)...
| Code | Meaning |
|---|---|
| \w | Alphanumeric Characters |
| \W | Non-Alphanumeric Characters |
| \s | White Space |
| \S | Non-White Space |
| \d | Digits |
| \D | Non-Digits |
| \b | Word Boundary |
| \B | Non-Word Boundary |
| \A or ^ | At the Beginning of a String |
| \Z or $ | At the End of a String |
| . | Match Any Single Character |
| * | Zero or More Occurrences |
| ? | Zero or One Occurrence |
| + | One or More Occurrences |
| { N } | Exactly N Occurrences |
| " { N,M } " | Between N and M Occurrences |
| .* |
"Greedy Match up to the last thingy " |
| .*? |
"Non-Greedy Match up to the first thingy" |
| [ set_of_things ] | Match Any Item in the Set |
| [ ^ set_of_things ] | Does Not Match Anything in the Set |
| ( some_expression ) | Tag an Expression |
| $1..$N | Tagged Expressions used in Substitutions |
in replace: use \( and \) to delimit things you want access to in the replace; use \1, \2, etc. to access them in replace
I put the following in a file called cron.txt in my home directory. I used tab delimiting, though spaces and tabs are supposed to work. Lines beginning with the pound sign are ignored.
The one non-comment line says that on Oct 7 at 14:00 the command will be executed. That command invokes a unix mailer to send me an email with the body "move chemical bin". I could have more commands in the same file (I actually do have several lines in the one I just submitted to send me reminders on successive days).
------------ file cron.txt --------------- # execute this file as: # crontab cron.txt # % is interpreted as newline # put message between % signs # I couldn't figure out how to get a subject without mail giving me a hard time #minute hour day month weekday command 00 14 7 10 * mail my_email_address@stanford.edu % move chemical bin % --------- end of file -------------------
So to get this command added to the datafile that the cron dameon checks you execute the following at the command line:
$> crontab <filename>
You can check the contents of your cron datafile by executing:
$> crontab -lI haven't had success doing this after logging out, so it's hard to see if I've submitted jobs already. Worst-case is simply to resubmit and get multiple reminder emails.
#!/usr/bin/perl -w
use POSIX qw(strftime);
my $sendmail = "/usr/sbin/sendmail -t";
my $lastcount = 0;
my $oldtime = (time + 1);
do
{
my $count = `wget \'' -O - -q | wc -c`;
if(($count != $lastcount) && $lastcount)
{
print "changed!\n";
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
print SENDMAIL 'From: '."\n";
print SENDMAIL 'To: '."\n";
print SENDMAIL 'Cc: '."\n";
print SENDMAIL 'Subject: New posting'."\n";
print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL 'New posting'."\n";
close(SENDMAIL);
}
$lastcount = $count;
do {1;} while(time < $oldtime);
$oldtime = time + 60; # 60 second delay
my $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime;
print "checking at $now_string\n";
}
while(1);
|
VAR(<variable name>)
save I25.M0:all
wa=sample(getData("I0.M1a:gm" ?result "dc-dc" ?resultsDir "/export/disk2/home/jon/simulation/folded1015_test/spectre/schematic") 0.2 3 "linear" 0.05 )
wb = sample(mag(VF("/V")) 0.2 3 "linear" 0.05)
ocnPrint( ?output "~/ic4/gmvsdcout.txt" wa wb)
source ~/ocn2matlab.csh gmvsdcoutwhich is here
results() ; open up the results
selectResults('ac)
x=vm("/Vout")
y=vp("/Vout")
ocnPrint(?output "filename.txt" ?numberNotation 'scientific ?numSpaces 1 x y)
filename = 'filename.txt'; Z = dlmread(filename, ' ', 3, 0); freq = Z(:,2); % wierd because of the way dlmread treats spaces when more than one mag = Z(:,6); phase = Z(:,9);
printvscommand that will print datapoints to screen from which they can be saved to a file.