-
COMPRESS_SCRIPT.sh.txt
The 'awk' program in this script uses 'substr', 'if-else',
'printf', and 'print'.
-
COUNTelements_in_nasdemos.sh.txt
Uses '{print $1" "$2}' and '{print \$1}'.
-
alarm_neti_1host.sh.txt
Uses 'NR', 'next', 'printf' and simple math (multiplication, division,
and addition). The 'awk' output is piped to a 'sort' command.
-
alarm_netidelta_1host.sh.txt
Uses 'printf' with some columnar re-formatting of strings and integer numbers.
-
alarm_netpdelta_1host.sh.txt
Uses 'printf' with some re-formatting of 6 columns of integer numbers.
-
alarm_nfs_1host.sh.txt
Uses 'printf' with simple math and re-formatting of strings and floating-point numbers.
Also uses an 'awk' with '>' and '||' logic to select records to print as '$0'.
-
alarm_top_ps_1host.sh.txt
Uses 'printf' for columnar re-formatting of strings, left and right justified
--- followed by a sort.
Also uses an 'awk' with '>' and '&&' logic to select records to print as '$0'.
-
ascii2hex.sh.txt
Passes 'awk' the awk code in the following 'ascii2hex_awkprog' script, after
setting a couple of variables with two '-v' options.
-
ascii2hex_awkprog.sh.txt
Uses 'BEGIN', 'if', '==', 'print', 'for ( i=1; i<=recLEN; ++i )', 'next', 'END',
and 2 user-defined functions 'binarySearch' and 'load_hex_ascii_table'.
-
calcline.sh.txt
No use of 'awk', but an interesting use of the 'bc -l' command for non-trivial mathematics.
-
chk4huge_locscr_userideas.sh.txt
Uses 'printf' with 'NF' and simple math --- does re-formatting of strings
and floating-point numbers.
Feeds input to 'awk' with the 'find', 'ls', and 'sort' commands.
Uses 'bc' to calculate some initial numbers --- a directory size in megabytes and
a file size limit in bytes.
-
chk_aliases4varmail.sh.txt
Uses 'if', 'NF', '!=', '~', 'substr', '!~', 'continue', 'print' and 'printf'
in some commented multi-line 'awk' commands.
-
chk_files_nfs_cmds.sh.txt
Uses the pipe of commands: df -F nfs | tail +2l | awk '{print $7}'
-
chk_files_usercmds.sh.txt
Uses the pipe of commands: df -F nfs | tail +2l | awk '{print $7}'
-
chk_files_userprocs.sh.txt
Uses the pipe of commands: df -F nfs | tail +2l | awk '{print $7}'
-
chk_varmail.sh.txt
Uses 'if', '~', 'NF', '!=', 'substr', '!~', 'continue', 'print' and 'printf'
in some multi-line 'awk' commands.
-
clemson_iv2stl_run_ivview_bygui.sh.txt
Uses 3 commands like: ls -l $FILEIN | awk '{print $5}'
to get file-size (in bytes) for 3 different files.
-
compress_1dir.sh.txt
Uses the command: ls -ld ${dirname1} | awk '{print $3}'
to get the userid of the owner of a directory.
-
compress_dir_all_levs.sh.txt
Uses the command: ls -ld ${dirname1} | awk '{print $3}'
to get the userid of the owner of a directory.
-
compressun_1dir.sh.txt
Uses the command: ls -ld ${dirname1} | awk '{print $3}'
to get the userid of the owner of a directory.
-
compressun_dir_all_levs.sh.txt
Uses the command: ls -ld ${dirname1} | awk '{print $3}'
to get the userid of the owner of a directory.
-
config_localdirs.sh.txt
Uses the command: du -l / | awk ' { print $2 }' | sort
to get a sorted list of all directory names on a host computer.
-
cyberware_ply2dxf_run_bygui.sh.txt
Uses 3 commands like: ls -l $FILEIN | awk '{print $5}'
to get file-size (in bytes) for 3 different files.
-
cyberware_plyTO3ds_run_bygui.sh.txt
Uses 3 commands like: ls -l $FILEIN | awk '{print $5}'
to get file-size (in bytes) for 3 different files.
-
dfk_anyhost_bygui.sh.txt
Uses 'printf' for re-ordering of columns of data, and making each line into two.
The 'awk' is preceded by 'sed' and 'sort'.
-
dfk_filsys_anyhost_bygui.sh.txt
Uses 'printf' for re-ordering of columns containing text and calculated
floating-point numbers, and making each line into two.
The 'awk' is preceded by 'sed' and 'sort'.
-
dfk_local.sh.txt
Uses 'printf' for re-ordering of columns of data, and making each line into two.
The 'awk' is preceded by 'sed' and 'sort'. Some columns are left-justified, and
some columns are right-justified.
-
dfk_main.sh.txt
Uses 'printf' for re-ordering of columns of data, and making each line into two.
The 'awk' is preceded by 'sed' and 'sort'. Some columns are left-justified, and
some columns are right-justified.
-
dir_ls_stat_info.sh.txt
Uses 'awk' to select and re-order 4 columns, using the command:
awk '{print $8 " " $5 " " $6 " " $7}
-
dirname_levnum.sh.txt
Uses 'echo' and 'tr' and 'wc' to provide input to a simple awk command:
awk '{printf ("%3s\n", $1)}'
For a given (fully-qualified) directory name, this script
shows the level number of the directory --- determined by
the number of slashes in the directory name.
-
diruse_files_all_levs_agesort_awkprog.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
-
diruse_files_all_levs_agesort_bygui.sh.txt
Passes the 'diruse_files_all_levs_agesort_awkprog' awk program, above, to the
'awk' command --- and pipes the output into a 'sort' command.
-
diruse_files_all_levs_fullnamesort_bygui.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
The awk is preceded by an 'ls -l' command piped into a 'sort' command.
-
diruse_files_all_levs_sizesort_bygui.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
The awk is preceded by an 'ls -l' command piped into a 'sort' command.
-
diruse_files_onelevel_agesort_bygui.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
An 'ls -altr' command is piped into the 'awk' command.
-
diruse_files_onelevel_sizesort_bygui.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
The awk is preceded by an 'ls -l' command piped into a 'sort' command.
-
diruse_subdirs_LOCAL_onelevel_2stdout.sh.txt
This script basically uses the one-line command:
ls -Al "$DIRNAME" | grep "^d" | awk '{ print $NF }'
-
diruse_subdirs_onelevel_2stdout.sh.txt
This script basically uses the one-line command:
ls -Al "$DIRNAME" | grep "^d"| awk '{ print $NF }'
-
diruse_subdirs_onelevel_agesort_bygui.sh.txt
Uses 'printf' to calculate and format a floating-point number column
along with columns of text. Uses 'index' and 'substr' to get a filename
at the end of a line, even if the filename has embedded spaces.
An 'ls -altr' command is piped into the 'awk' command.
-
diruse_subdirs_onelevel_sizesort_LOCAL_bygui.sh.txt
This script calls the script 'diruse_subdirs_LOCAL_onelevel_2stdout' above.
-
diruse_subdirs_onelevel_sizesort_bygui.sh.txt
This script calls the script 'diruse_subdirs_onelevel_2stdout' above.
-
duseanydir.sh.txt
Uses the 'printf' command to format 2 columns and pass the results to a
'sort' command.
-
duseanydir_onelevel.sh.txt
Uses 'awk' twice --- once to get a list of subdirectories.
Then a 2nd time to format 2 columns (name-and-size) which are size-sorted.
-
egrep_like_awk_plusminusNlines.sh.txt
The '-v' option is used to pass two parameters to the 'awk' program.
A *MANY-LINE* awk program uses 'BEGIN', 'for ( i = 1 ; i <= N ; i++ )',
an array 'prev[i]', 'toupper', 'split', 'if', '~', 'printf', 'NR',
'==', '=', '!=', 'for ( i = N ; i > 0 ; i-- )', and '&&'.
This is a command that finds lines that contain one or more specified strings
--- but this command also shows lines plus-or-minus N lines above and below
the 'match lines'.
-
exports_sgia.sh.txt
Uses the following command to print each input line as 4 output lines:
awk '{printf "%-20s \n %s \n \n", $1 , $2 }'
-
feinp_generic2stl_awkprog.sh.txt
This is a *LENGTHY* awk program which includes some non-trivial mathematics.
For example, the components of normal vectors are calculated by code like:
ax=x7-x2; ay=y7-y2; az=z7-z2
bx=x6-x2; by=y6-y2; bz=z6-z2
cx=ay*bz-az*by
cy=az*bx-ax*bz
cz=ax*by-ay*bx
This awk code includes a function named 'binarySearch' that deals with
finding elements of an array relatively quickly via an index.
Giving credit where it is due:
The idea of an awk-based NASTRAN/ABAQUS/IDEAS-to-STL utility, and, in particular,
the mathematics in this awk program (for computing 'normals' to triangles for
an STL file) is based on a NASTRAN(CTRIA3)-to-STL 'awk' script found in a 1998
ICCON (IDEAS User Group) email from "Bronislav Plemenitas"
(bronch.plemenitas@avl-ast.si) of SLOVENIA.
NASTRAN and
ABAQUS and
I-DEAS are/were FEA
(Finite Element Analysis) and Finite Element Modeling
(pre and post processing) computer programs.
STL refers to
Stereolithography file format.
The 'feinp_generic2stl_awkprog' script above provides an awk program
that exercises many useful features of the awk programming language.
In fact, it uses awk features such as 'BEGIN', 'printf', '=' (value assignment),
'++', 'toupper', 'if', 'NF', '<', 'exit', '[i]' (array indexing), '==',
'||', 'else', 'next', '&&'. 'END', 'print', '<=', 'while', 'else if',
'int()', 'return'.
-
feinp_generic2stl_awkprogTESTcbeam_cbar.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CBEAM and CBAR FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTchexa.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CHEXA FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTcpenta.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CPENTA FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTcquadxs.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CQUADx FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTcrod_ctube.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CROD and CTUBE FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTctetra.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CTETRA FEA RECORDS
into triangle elements of an STL file.
-
feinp_generic2stl_awkprogTESTctriaxs.sh.txt
A subset of the 'feinp_generic2stl_awkprog' awk program above.
FOR TESTING OF REFORMATTING OF 'GENERIC' CTRIAx FEA RECORDS
into triangle elements of an STL file.
-
feinp_nas2freeform_elinfo_awkprog.sh.txt
-
feinp_nas2freeform_elinfo_awkprogTESTcbeam_cbar.sh.txt
-
feinp_nas2freeform_elinfo_awkprogTESTcrod_ctube.sh.txt
-
feinp_nas2freeform_elinfo_awkprogTESTrbe2.sh.txt
-
feinp_nas2freeform_nodeinfo_awkprog.sh.txt
-
feinp_nas2stl_bygui.sh.txt
-
feinp_nas2stl_nogui_TESTawkprogs.sh.txt
-
fil_linlen_each.sh.txt
An 'awk' program that reads a (text) file and shows the length
of each line --- with a summary at the end that shows the max and min
line lengths and number of records read and average characters per record.
Uses 'BEGIN' and 'END' sections in addition to the 'body' section.
-
fil_linlen_summ.sh.txt
-
file_ls_stat_info.sh.txt
-
files4dir_all_levs_namesortPERsubdir.sh.txt
-
filesel_info4allfiles_4dir_showBYgui.sh.txt
-
fileuse_queries.plan.sh.txt
-
findANDshow_stringINfile_plusminusNlines.sh.txt
-
find_big_ideas_datamgmt_fils4dataprod_dir.sh.txt
-
find_files4filetype.X.sh.txt
-
findfils4type_basename_bygui.sh.txt
-
findfils4type_bygui.sh.txt
-
get_Xcolor_RGBvals.sh.txt
-
get_ideasfe_usage.sh.txt
-
get_nas_usage.sh.txt
-
grep_10lines_around.sh.txt
-
grep_3lines_around.sh.txt
-
groupids.sh.txt
-
hc_idgrfx2hpA_prtr.sh.txt
-
hc_idgrfx2psA_prtr.sh.txt
-
hex2ascii.sh.txt
-
hex2ascii_TEST.sh.txt
-
hex2ascii_awkprog.sh.txt
-
hometemp2locoutlist.lis.sh.txt
-
host2host_diff_two_dirs_showBYgui.sh.txt
-
host2host_diff_two_files_showBYgui.sh.txt
-
host2host_filecnt_4subdirs_alllevs_locrmt_showBYgui.sh.txt
-
host2host_info4allfiles_4dir_showBYgui.sh.txt
-
hostids_all.sh.txt
-
ipaste_knight.sh.txt
-
lp_cancel_multi.sh.txt
-
net_services_bynam.sh.txt
-
netstat_ifdelta.sh.txt
-
netstat_ifdelta_wrapper.sh.txt
-
pingaddrs__bysubnet.sh.txt
-
prtplt_chk_netconnect.sh.txt
-
prtplt_chk_prt_daemons.sh.txt
-
prtplt_gen_iaw_hostslist_via_dns.sh.txt
-
prtplt_sho_dns_hosts_IPdupes.sh.txt
-
prtplt_sho_dns_hosts_IPdupes_awk.sh.txt
-
prtplt_sho_dns_hosts_IPsort.sh.txt
-
prtplt_sho_dns_prtrs_IPdupes.sh.txt
-
prtplt_sho_dns_prtrs_IPsort.sh.txt
-
prtplt_sho_iaw_hosts_dns_IPsort.sh.txt
-
ps_cumcpusort_anyhost_bygui.sh.txt
-
ps_memsort_anyhost_bygui.sh.txt
-
ps_parents_children_tree_bygui.sh.txt
-
rmtcmds4netstat_colls_sortOFallhosts.sh.txt
-
rmtcmds4netstat_deltapkts_sortOFallhosts.sh.txt
-
rmtcmds4sar_locdisk_sortOFallhosts.sh.txt
-
rmtcmds4sar_syscalls_sortOFallhosts.sh.txt
-
rmtcmds4topps_cumcpu_sortOFallhosts.sh.txt
-
rootwin_kill_bgpaste.sh.txt
-
runcmd_on_pingable_hosts_bygui.sh.txt
-
runcmd_topps_cumcpu_1host.sh.txt
-
search4key_funcs.sh.txt
-
search4key_helps.sh.txt
-
select_subdir_siz_recs.sh.txt
-
select_subdir_siz_recs_Nlevels_bygui.sh.txt
-
select_subdir_siz_recs_bygui.sh.txt
-
select_subdir_siz_recs_division_bygui.sh.txt
-
set_localoutlist.sh.txt
-
set_pwd.sh.txt
-
sgiRGB2hprtl_HPDesignJet.sh.txt
-
sgiRGB2hprtl_HPDeskJet.sh.txt
-
sgiscrn2hprtl_HP_iaw###.sh.txt
-
sgiscrn_blur_proc.sh.txt
-
sgiscrn_blur_proc_testlight.sh.txt
-
sgiscrn_del_scrarea_lines_proc.sh.txt
-
sho_dns_hosts.sh.txt
-
sho_filesys_sgiab.sh.txt
-
sho_filesys_siz_prtfx.sh.txt
-
sho_filesys_siz_prtx.sh.txt
-
sho_filesys_siz_start_new.sh.txt
-
sho_filesys_siz_start_widex.sh.txt
-
sho_iaws_locscrperms.sh.txt
-
sho_iconprops_anydesktop.sh.txt
-
sho_pingable_hosts.sh.txt
-
sho_quota_files4user_bygui.sh.txt
-
sho_scrnsavr_allusers.sh.txt
-
sho_scrnsvrs_alldesktops.sh.txt
-
sho_sgisubnets.sh.txt
-
sho_tk_visualsavailable_anyhost_bygui.sh.txt
-
sho_userid_mailalias_match.sh.txt
-
sho_userid_mailalias_mismatch.sh.txt
-
shobiguser_bigfils.sh.txt
-
show_textfile_of_hostlist_bygui.sh.txt
-
showerrs_syslog_anyhost_bygui.sh.txt
-
space_topNsubdirs_apps_bygui.sh.txt
-
space_topNsubdirs_data_bygui.sh.txt
-
stl2admesh_fillholes_ivview_bygui.sh.txt
-
stl2dxf2iv_admesh_ivview_bygui.sh.txt
-
stl2vrml1_admesh_ivview_bygui.sh.txt
-
topps_cumcpu_anyhost.sh.txt
-
topps_cumcpu_rmt.sh.txt
-
tr_linefeed_carrretn_unix_ms_mac.sh.txt
-
userids.sh.txt
-
userids_bydept.sh.txt
-
userids_bystring.sh.txt
-
userids_bystring_bygui.sh.txt
-
usernums.sh.txt
-
who_on_anyhost_bygui.sh.txt
-
whosgihosts_bydept.sh.txt
-
whosgihosts_bysubnet.sh.txt