9/22/15
fiddling around with the testscript.tcsh, currently have:
#!/bin/tcsh
set ARG = $1
echo $ARG
find ~ -name "*ARG*" -print
used this command: ./testscript.tcsh .txt
got this output: /home/leal/PhysHonr268n/homesearch_ARG.txt
wondering how to get it to display all files with the given argument
deleted the above file cause it was just an empty file and now, my script is running but not returning any files
after some tweaking with Avi, changed last line of script to:
find . "*$ARG*" -print
with this command: ./testscript.tcsh .tcsh
I now get this:
.tcsh
.
./homesearch.tcsh~
./file.txt
./file.txt~
./#file.txt#
./testscript.tcsh
./testscript.tcsh~
./testfile~
./homesearch.tcsh
./test.txt~
./searchandfind.tcsh
./#testscript.tcsh#~
./searchandfind.tcsh~
find: `*.tcsh*': No such file or directory
not sure why it keeps saying that it can't "find" a file or directory but also gives me everything in the current directory
10/1/2015
g++ file_name_here compiles that file, then it appears that file stays on call to be executed(using ./a.out) until you compile something else. I wonder if i can adjust ./a.out to run something from a separate directory....
I found out
-you can compile stuff from a different directory as long as you provide the proper file path
- ~/a.out doesnt work like i thought it would(assuming the file is in ~ and im attempting to run from a subdirectory.)
-weirdly, you can run a script from a directory below you, this works(below) apparently though, I'm not sure why the '.' works, though main.cpp is in PhysHonr268n, not ~. I guess the compiler stores the compiled file in your current directory to be executed?
[leal@hepcms-in1 ~]$ g++ ~/PhysHonr268n/main.cpp
[leal@hepcms-in1 ~]$ ./a.out
hello world
i = 2
a = 3.3
a*i = 6
...when you compile and have no errors... *explosions and confetti and champagne popping*
11/4
plotting functions in root
TF1 *f1 = new TF1("title", function(x) , beginning of range, end of range);
f1->Draw();