

InterviewSolution
1. |
Solve : Help Writing Scripts? |
Answer» I am very new to Unix but I am learning. I am working on script writing. I know a lot of perl but as far as bash and awk and all the other scripting languages that is what I am trying to learn. could you explain the awk a little more. I am just trying to spread my wings with scripting lanuages. I do not know any bash c shell or anything of that sort and I believe it will be helpful to learn. How would I store the output to a variable?don't use C shell. use bash if you can. how to store variable Code: [Select]var=$(last | .....) or Code: [Select]var=`last | .....` #note the backticks, not single quote anyway,please look at my signature for bash scripting guide, as well as some awk resources.I want to see who owns more files me or root? I do not want to include directories in my search. I want it to output two lines...root (# of files) myusername (# of Files). What command tells who owns a file? and where is a good place to start? I am experimenting with perl and awk right now but I am not eliminating other options. Thank you awk is a pattern recognition language. It is very powerful. I recommend PURSUING it, but I'd spend a little more time with shell script commands. Get used to how you can use them before you go on to awk.I was going to use find. If I am in a directory bla/bla/crap and I want to start my search from the root how do I do that? is it find / -name myusername ? How do I count all of them?Quote from: Circuit_Girl on March 19, 2009, 07:03:08 PM I am very new to Unix but I am learning. I am working on script writing. I know a lot of perl but as far as bash and awk and all the other scripting languages that is what I am trying to learn. You may want to to the following bash web site to get some education on bash scripting. http://www.bashscripts.org/ |
|