Linux Tips
shell
- how to merge file_1 and file_2 into file_3
sort -m file_1 file_2 > file_3
- how to get lines of file_name
wc -l file_name
- kterm$BFb$G(BCtrl-x,Ctrl-s$B$GI=<($,8G$^$C$?$i(BCtrl-Q$B$G2r=|(B
- $B%U%!%$%k$N6uGr9T$r:o=|!'(B grep -v ^$ test.txt > test2.txt
intel Fortran compiler
- $B:GE,2=%*%W%7%g%s$r$O$:$7$?J}$,7W;;$,Aa$$;~$,$"$k!#(B
- $B%^%K%e%"%k$K$O$J$$(B-O5$B$H$$$&$N$,B8:_$9$k!#(B
- pgplot$B$rMQ$$$k$H$-$O%3%s%Q%$%k%*%W%7%g%s$r$O$:$9!#(B
gnuplot
- gnufit with initial values
ex.) a=6
b=1
c=10
f(x)=c*(x-a)**b
fit f(x) "*.dat" via a,b,c
- Inserting parameters obtained by gnufit on a graph
$B:G>.<+>h(Bfit$B$r9T$C$FF@$i$l$?%Q%i%a!<%?$N?tCM$r!$(B
$B?^$N%i%Y%k$H$7$F=q$-9~$_$^$9!#(B
fit $B%3%^%s%I$G$^$:?tCM$r5a$a!$(B
set label "A=%g",a $B$N$h$&$K%i%Y%k$rDj5A$9$k$H!$(B
$B;XDj$5$l$?%U%)!<%^%C%H$G%i%Y%k$NJ8;z$,:n$i$l$^$9!%(B
gnuplot> f(x)=a*x*x+b*x+c
gnuplot> fit f(x) 'test.dat' using 1:2:3 via a,b,c
gnuplot> set label 1 "Y=AX^2+BX+C" at 11,1225
gnuplot> set label 2 "A = %g", a at 12,1200
gnuplot> set label 3 "B = %g", a at 12,1180
gnuplot> set label 4 "C = %g", a at 12,1160
gnuplot> plot f(x),'test.dat' using 1:2:3 with yerr
submitting jobs into YITP computers(altixgate)
- login altixgate as "ssh altixgate"
- "bqueues" shows status of all machines
- bsub -q S(1|2|3) script_name
format of shell script:
#!/bin/bash
cd $HOME/fort/ <-- !!! IMPORTANT !!!
a.out > log
vi
- inserting characters
before cursor: i
after cursor: a
under cursor: o
over cursor: 0
- delete one character: x
- delete one line: dd
- copying and pasting one line(under the cursor):
Y --> p
- undo: u(in command mode)
- replacing char_1 by char_2
:%s/char_1/char_2/g
- shell mode
:sh
- saving with another name
:w newfilename
- inserting other file into a file
:r filename
Emacs
- Anthy$B5/F0Cf$K(BMark Set$B$r9T$&(B
Ctrl-space$B$NBe$o$j$K(BCtrl-@$B$r;H$&!#2!$7$K$/$$$1$I!#(B
tgif
- $B%3%^%s%I$G7A<0$r;XDj$7$F2hA|:n@.(B
EPS$B%U%!%$%k!'(Btgif -stdout -print -eps -color temp003.obj > temp.eps
LaTEX
- minipage$B4D6-$GA^F~$7$?#2$D$N?^$N%-%c%W%7%g%s$rN%$9!#(B
begin{figure}[ht]
\hspace{-3mm}$B!!!!!!!!!!"+$3$N9T$rDI2C!%?tCM$OE,Ev$KJQ2=$5$;$k!%(B
\begin{minipage}{0.5\hsize}$B"+?tCM$rE,Ev$KJQ2=$5$;$k!%(B
\begin{center}
\vspace{0mm}
\includegraphics[width=5cm]{filename1.eps}
\caption[s]
{*** resolution *** 3.6.ANW10$^8$ pps.}
\label{label1}
\vspace{0mm}
\end{center}
\end{minipage}
\hspace{5mm}$B!!!!!!!!!!"+$3$N9T$rDI2C!%?tCM$OE,Ev$KJQ2=$5$;$k!%(B
\begin{minipage}{0.5\hsize}$B"+?tCM$rE,Ev$KJQ2=$5$;$k!%(B
\begin{center}
\vspace{0mm}
\includegraphics[width=5cm]{filename2.eps}
\caption[s]
{*** resolution *** 6.0.ANW10$^7$ pps.}
\label{label2}
\vspace{0mm}
\end{center}
\end{minipage}
\end{figure}
Convert
- $B2hA|%5%$%:$rH>J,$K$9$k(B
convert -resample '50%' (input file) (output file)
Windows Tips
$BI.5-BN>.J8;z$N(Bl$B$r=q$/J}K!(B
l$B$H=q$$$FA*Br$7$?8e!"%U%)%s%H$r!V(BMTExtra$B!W$KJQ99$9$k!#(B
$BI.5-BN>.J8;z$N(Bv$B$r=q$/J}K!(B
v$B$H=q$$$FA*Br$7$?8e!"%U%)%s%H$r!V(BHGS$B9T=qBN!W$+!V(BHG$B9T=qBN!W$KJQ99$9$k!#(B