11-30-2007
ok that gave me an idea and i found this in an old script and it seems to to the job sortof now i just need to figure out how to trim the . & : out of the concatenated variable name:
export dir=" "
while read m1 m2 m3 m4 m5 m6 m7 m8 m9 m10
do
echo $m1 | grep ./ > /dev/null
if [ $? = 0 ]; then
dir=$m1
fi
echo $m5" "$dir/$m9
done < ls.out
907 ./pldir:/rdmtp_show_constants01.cgi
2734 ./pldir:/rdmtp_show_chart01.cgi
3693 ./pldir:/rdmtp_search_chart1.cgi
31271 ./pldir:/rdmtp_run_consistency02.cgi
10456 ./pldir:/rdmtp_rbc_showNMI01.cgi
8962 ./pldir:/rdmtp_rates_show01.cgi
57973 ./pldir:/allpl
13050 ./pldir:/rdmtp_financials_show02.cgi
512 ./perl:/rdmtools
438 ./perl:/substitute_char.pl
575 ./perl:/substitute_and_remove_delinator.pl
1013 ./perl:/scan_data.pl
464 ./perl:/remove_deliminator.pl
1444 ./perl:/bcp_out_tables.pl
4774 ./perl:/verbose_add.pl
8708 ./perl:/all
23932 ./perl:/dnr1
23932 ./perl:/dnr1.pl
63694 ./perl:/rdmtools_lib.pm
36180 ./perl:/rdmtools_gap_calculate.cgi
38198 ./perl:/rdmtools_functions.pm
37954 ./perl:/rdmtools_financials_diff.cgi
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
On a Sun OS system we have, when executing a ps command it displays a third parties applications password. The ps command used is from the ucb dir, but if you use the ps command which resides in the bin dir it doesn't display the password.
Other users need to use the ps command from the ucb... (2 Replies)
Discussion started by: dbrundrett
2 Replies
2. UNIX for Advanced & Expert Users
Dear expert,
what is this command touch -c filename using for?
I find if execute and filename is existed, it update the date to now.
If the filename is not exeisted, it don't create the file..
so what is this command using for?
Thank a lot! (1 Reply)
Discussion started by: zp523444
1 Replies
3. Shell Programming and Scripting
Greetings,
I am trying to write script, (preferably in sh) that will use a proprietary program to print the resolution and name of files in the current working directory in a vertical format.
I think this script will require 3 commands with variables and a pipe to the prop program, but am not... (6 Replies)
Discussion started by: rocinante
6 Replies
4. UNIX for Dummies Questions & Answers
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (2 Replies)
Discussion started by: Sriranga
2 Replies
5. Shell Programming and Scripting
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (4 Replies)
Discussion started by: Sriranga
4 Replies
6. Shell Programming and Scripting
Hi,
Can the below command will be working in FTP
dir */*/*/*.zip
I want to dynamically know the folder names where the zipfiles are present.
Thnx in advance. (1 Reply)
Discussion started by: weknowd
1 Replies
7. Shell Programming and Scripting
HI
i have below command and i want to run it on each logs of each and every Dir.
/home/Laco/Al
I have sub dir in this folder
/home/Laco/Al/04092012/LP/X/*.logs
/home/Laco/Al/04092012/LP/Y/*.logs
/home/Laco/Al/04092012/LP/Z/*.logs
/home/Laco/Al/04092012/LP/P/*.logs
I want to run... (5 Replies)
Discussion started by: asavaliya
5 Replies
8. Windows & DOS: Issues & Discussions
Well since Windows always laments over some of my files having a too long "path+filename" and it gets in the way of copying complete directory structures I would love to have a DOS Script that helps me with finding those.
I already tried DCSoft Long Filename Finder but that is neither DOS based... (3 Replies)
Discussion started by: pasc
3 Replies
9. Shell Programming and Scripting
Running below command , but unable to print the filename , is there way to print filename/dirname using -print option
find . -type f -exec aclput -i fileacl.template {} \; (5 Replies)
Discussion started by: lalitpct
5 Replies
10. Shell Programming and Scripting
buddies,
my requirement would be as follows,
I have a file called test.txt and content of it would be
yahoo
gmail
hotmail
and i want to search a file name called "yahoo.html" (first line of test.txt) and then "gmail.html" and then "hotmail.html" in a /home/test dir.
Any idea... (8 Replies)
Discussion started by: natraj005
8 Replies
IGAWK(1) Utility Commands IGAWK(1)
NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO
gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)