I’ve got requests already for grep
and awk
info. I’m working on the grep
stuff, should be out soon, honest. Apparently this shortage of round tuits should not last long. I’ll see what I can do about awk
; I know about one thing with awk, something along the lines of df| awk '{ print $5,$1,$6 }'
So; post comments here, if there’s a particular *nix (particularly shell-based) hint or tip you would like to see.
WordPress doesn’t seem to have any kind of facility for voting, so we’ll just start with a simple “tell me what you want” system. If people want stuff, I’ll try to post it (if I know it!)
Well, it’s grep and awk so far.
Regular Expressions seem to be the Theme of the Day.
If I’ll be treating this thread is my in-tray, then these seem to be the first two entries.
Feel free to add what you like; this could tend towards an academic bent (esoteric switches for ‘find’) or a sysadmin bent (“what is the difference between
vxprint -th
andvxprint -Ath
?”)Ask away, I’ll see what I can do …
Hi Steve,
Recently a co-worker stated that the latest bash release supports shell libraries. I grabbed the latest version and saw no mention of shell libraries. Do you know anything about them? I assume Bash is using something similar to Perl like @INC.
Thanks,
Jay
I suspect that he means that you can use a “library” file as in http://steve-parker.org/sh/functions.shtml :
#!/bin/sh
. library.sh
myfunc
Where
library.sh
definesmyfunc
:# No !/bin/sh stuff here
function myfunc()
{
echo “Hello, World!”
}
how to find the area of circle. and how to find the perimeter of circle. by shell programming of unix.
how to find the sum of ‘n’ natural number.
I’d be most inclined to use bc:
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty’.
pi=3.142
radius=5
pi * radius * radius
78.550
SHLIB – no, he meant that there is *some standard location* in a version of Bash. I will dig around and see if I can find it. In reality, if one just set a variable in the system wide profile like SHLIB=foo/ then you have accomplished the same thing 🙂
Please……………….. give the essential information alone…………………..dont waste time of people and students by writing stories