Formatting required with the output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Formatting required with the output
# 8  
Old 08-04-2014
I can't use find to produce your lines, but if this
Code:
/o/a/b/c/v.info
/o/a/b/c/d/v.info
/o/aa/bb/cc/v.info
/o/aa/bb/cc/dd/v.info

is your find's output (which I put into file), this
Code:
cat file | while read i; do for j in ${P[@]}; do [ "$i" != "${i#$j}" ] && continue 2; done; echo $i; P[((++CNT))]=${i%/*}; done
/o/a/b/c/v.info
/o/aa/bb/cc/v.info

produces the desired result.

EDIT: make sure P and CNT are unset before use.
# 9  
Old 08-04-2014
Rudi,

It is not helping :-(

it is still displaying v.info from the sub directories which i don't want.

---------- Post updated at 05:48 PM ---------- Previous update was at 05:47 PM ----------

rudi, thanks for ur time & help Smilie
# 10  
Old 08-04-2014
What system are you on? Post a hexdump of your find output.
# 11  
Old 08-04-2014
I don't have access to the hexdump Smilie

to be more simple and specific

is there any utility in unix which can help by not searching further below directory tree once the required file is find in this case it is v.info.

if it is found under /a/b/v.info then it should not traverse further to get the /a/b/c/v.info
# 12  
Old 08-04-2014
Use
Code:
od -tx1 v.info

# 13  
Old 08-04-2014
plz find the the hexdump for the command
Code:
0000000 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61
0000020 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f
0000040 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 55 42 44 2d
0000060 4a 42 6f 73 73 2f 51 45 50 55 42 44 2d 4a 42 6f
0000100 73 73 2f 73 65 72 76 65 72 2f 77 65 62 61 70 70
0000120 6c 69 63 61 74 69 6f 6e 73 2f 64 65 70 6c 6f 79
0000140 2f 75 62 64 2e 77 61 72 2f 76 65 72 73 69 6f 6e
0000160 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f
0000200 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64
0000220 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64 65
0000240 70 6c 6f 79 6d 65 6e 74 73 2f 55 42 44 2d 4a 42
0000260 6f 73 73 2f 51 45 50 55 42 44 2d 4a 42 6f 73 73
0000300 2f 75 62 64 2f 76 65 72 73 69 6f 6e 2e 69 6e 66
0000320 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d
0000340 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57
0000360 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 52 65
0000400 73 74 53 65 72 76 65 72 2d 4a 42 6f 73 73 2f 51
0000420 45 50 52 65 73 74 53 65 72 76 65 72 2f 73 65 72
0000440 76 65 72 2f 77 65 62 61 70 70 6c 69 63 61 74 69
0000460 6f 6e 73 2f 64 65 70 6c 6f 79 2f 73 65 72 76 69
0000500 63 65 73 2e 77 61 72 2f 76 65 72 73 69 6f 6e 2f
0000520 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70
0000540 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64 65
0000560 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64 65 70
0000600 6c 6f 79 6d 65 6e 74 73 2f 52 65 73 74 53 65 72
0000620 76 65 72 2d 4a 42 6f 73 73 2f 51 45 50 52 65 73
0000640 74 53 65 72 76 65 72 2f 73 65 72 76 69 63 65 73
0000660 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f
0000700 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64
0000720 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64 65
0000740 70 6c 6f 79 6d 65 6e 74 73 2f 59 43 43 2d 4a 42
0000760 6f 73 73 2f 51 45 50 59 43 43 2d 4a 42 6f 73 73
0001000 2f 73 65 72 76 65 72 2f 77 65 62 61 70 70 6c 69
0001020 63 61 74 69 6f 6e 73 2f 64 65 70 6c 6f 79 2f 79
0001040 63 63 2e 77 61 72 2f 76 65 72 73 69 6f 6e 2f 76
0001060 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74
0001100 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72
0001120 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c
0001140 6f 79 6d 65 6e 74 73 2f 50 61 79 69 74 61 6c 6c
0001160 50 61 79 4d 6f 6e 2d 4a 42 6f 73 73 2f 51 45 50
0001200 50 61 79 69 74 61 6c 6c 50 61 79 4d 6f 6e 2d 4a
0001220 42 6f 73 73 2f 73 65 72 76 65 72 2f 77 65 62 61
0001240 70 70 6c 69 63 61 74 69 6f 6e 73 2f 64 65 70 6c
0001260 6f 79 2f 70 61 79 69 74 61 6c 6c 70 61 79 6d 6f
0001300 6e 2e 77 61 72 2f 76 65 72 73 69 6f 6e 2f 76 65
0001320 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f
0001340 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f
0001360 64 65 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f
0001400 79 6d 65 6e 74 73 2f 50 61 79 69 74 61 6c 6c 50
0001420 61 79 4d 6f 6e 2d 4a 42 6f 73 73 2f 51 45 50 50
0001440 61 79 69 74 61 6c 6c 50 61 79 4d 6f 6e 2d 4a 42
0001460 6f 73 73 2f 70 61 79 69 74 61 6c 6c 70 61 79 6d
0001500 6f 6e 2f 70 61 79 69 74 61 6c 6c 70 61 79 6d 6f
0001520 6e 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f
0001540 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e
0001560 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64
0001600 65 70 6c 6f 79 6d 65 6e 74 73 2f 44 43 53 65 72
0001620 76 6c 65 74 73 2d 4a 42 6f 73 73 2f 51 45 50 44
0001640 43 53 65 72 76 6c 65 74 73 2d 4a 42 6f 73 73 2f
0001660 73 65 72 76 65 72 2f 77 65 62 61 70 70 6c 69 63
0001700 61 74 69 6f 6e 73 2f 64 65 70 6c 6f 79 2f 59 6f
0001720 64 6c 65 65 2e 77 61 72 2f 76 65 72 73 69 6f 6e
0001740 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f
0001760 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64
0002000 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64 65
0002020 70 6c 6f 79 6d 65 6e 74 73 2f 44 43 53 65 72 76
0002040 6c 65 74 73 2d 4a 42 6f 73 73 2f 51 45 50 44 43
0002060 53 65 72 76 6c 65 74 73 2d 4a 42 6f 73 73 2f 64
0002100 63 73 65 72 76 6c 65 74 73 2f 64 63 73 65 72 76
0002120 6c 65 74 73 2f 76 65 72 73 69 6f 6e 2e 69 6e 66
0002140 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d
0002160 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57
0002200 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 4e 65
0002220 77 53 44 4b 2d 4a 42 6f 73 73 2f 53 74 61 62 53
0002240 44 4b 52 2d 4a 42 6f 73 73 2f 73 65 72 76 65 72
0002260 2f 77 65 62 61 70 70 6c 69 63 61 74 69 6f 6e 73
0002300 2f 64 65 70 6c 6f 79 2f 79 6f 64 73 6f 61 70 2e
0002320 77 61 72 2f 76 65 72 73 69 6f 6e 2f 76 65 72 73
0002340 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74
0002360 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65
0002400 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d
0002420 65 6e 74 73 2f 4e 65 77 53 44 4b 2d 4a 42 6f 73
0002440 73 2f 53 74 61 62 53 44 4b 52 2d 4a 42 6f 73 73
0002460 2f 73 64 6b 2f 6e 65 77 73 64 6b 2f 73 65 72 76
0002500 65 72 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a
0002520 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61
0002540 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f
0002560 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 4e 65 77 53
0002600 44 4b 2d 4a 42 6f 73 73 2f 51 45 50 4e 65 77 53
0002620 44 4b 2d 4a 42 6f 73 73 2f 73 65 72 76 65 72 2f
0002640 77 65 62 61 70 70 6c 69 63 61 74 69 6f 6e 73 2f
0002660 64 65 70 6c 6f 79 2f 79 6f 64 73 6f 61 70 2e 77
0002700 61 72 2f 76 65 72 73 69 6f 6e 2f 76 65 72 73 69
0002720 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74 69
0002740 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65 70
0002760 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d 65
0003000 6e 74 73 2f 4e 65 77 53 44 4b 2d 4a 42 6f 73 73
0003020 2f 51 45 50 4e 65 77 53 44 4b 2d 4a 42 6f 73 73
0003040 2f 73 64 6b 2f 6e 65 77 73 64 6b 2f 73 65 72 76
0003060 65 72 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a
0003100 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61
0003120 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f
0003140 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 4d 6f 6e 65
0003160 79 43 65 6e 74 65 72 2d 4a 42 6f 73 73 2f 51 45
0003200 50 4d 6f 6e 65 79 43 65 6e 74 65 72 2d 4a 42 6f
0003220 73 73 2f 73 65 72 76 65 72 2f 77 65 62 61 70 70
0003240 6c 69 63 61 74 69 6f 6e 73 2f 64 65 70 6c 6f 79
0003260 2f 6d 6f 6e 65 79 63 65 6e 74 65 72 2e 77 61 72
0003300 2f 76 65 72 73 69 6f 6e 2f 76 65 72 73 69 6f 6e
0003320 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74 69 65 72
0003340 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65 70 6f 74
0003360 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d 65 6e 74
0003400 73 2f 4d 6f 6e 65 79 43 65 6e 74 65 72 2d 4a 42
0003420 6f 73 73 2f 51 45 50 4d 6f 6e 65 79 43 65 6e 74
0003440 65 72 2d 4a 42 6f 73 73 2f 6d 6f 6e 65 79 63 65
0003460 6e 74 65 72 2f 76 65 72 73 69 6f 6e 2e 69 6e 66
0003500 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d
0003520 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57
0003540 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 4d 6f
0003560 6e 65 79 43 65 6e 74 65 72 2d 4a 42 6f 73 73 2f
0003600 51 45 50 54 52 50 4d 6f 6e 65 79 43 65 6e 74 65
0003620 72 2d 4a 42 6f 73 73 2f 73 65 72 76 65 72 2f 77
0003640 65 62 61 70 70 6c 69 63 61 74 69 6f 6e 73 2f 64
0003660 65 70 6c 6f 79 2f 61 70 70 73 2e 77 61 72 2f 76
0003700 65 72 73 69 6f 6e 2f 76 65 72 73 69 6f 6e 2e 69
0003720 6e 66 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43
0003740 6f 6d 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f
0003760 52 57 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f
0004000 4d 6f 6e 65 79 43 65 6e 74 65 72 2d 4a 42 6f 73
0004020 73 2f 51 45 50 54 52 50 4d 6f 6e 65 79 43 65 6e
0004040 74 65 72 2d 4a 42 6f 73 73 2f 6d 6f 6e 65 79 63
0004060 65 6e 74 65 72 2f 76 65 72 73 69 6f 6e 2e 69 6e
0004100 66 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f
0004120 6d 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52
0004140 57 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 50
0004160 61 79 6d 65 6e 74 45 6e 67 69 6e 65 2d 4a 42 6f
0004200 73 73 2f 51 45 50 50 61 79 6d 65 6e 74 45 6e 67
0004220 69 6e 65 2d 4a 42 6f 73 73 2f 73 65 72 76 65 72
0004240 2f 77 65 62 61 70 70 6c 69 63 61 74 69 6f 6e 73
0004260 2f 64 65 70 6c 6f 79 2f 70 61 79 6d 65 6e 74 65
0004300 6e 67 69 6e 65 2e 77 61 72 2f 76 65 72 73 69 6f
0004320 6e 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f
0004340 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e
0004360 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64
0004400 65 70 6c 6f 79 6d 65 6e 74 73 2f 50 61 79 6d 65
0004420 6e 74 45 6e 67 69 6e 65 2d 4a 42 6f 73 73 2f 51
0004440 45 50 50 61 79 6d 65 6e 74 45 6e 67 69 6e 65 2d
0004460 4a 42 6f 73 73 2f 70 61 79 6d 65 6e 74 65 6e 67
0004500 69 6e 65 2f 50 61 79 6d 65 6e 74 45 6e 67 69 6e
0004520 65 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f
0004540 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e
0004560 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64
0004600 65 70 6c 6f 79 6d 65 6e 74 73 2f 4d 65 73 73 61
0004620 67 69 6e 67 53 65 72 76 69 63 65 2f 51 45 50 4d
0004640 65 73 73 61 67 69 6e 67 53 65 72 76 69 63 65 2f
0004660 73 65 72 76 65 72 2f 6d 65 73 73 61 67 69 6e 67
0004700 2d 6d 64 62 2f 64 65 70 6c 6f 79 2f 76 65 72 73
0004720 69 6f 6e 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f
0004740 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d
0004760 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53
0005000 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 4d 65 73
0005020 73 61 67 69 6e 67 53 65 72 76 69 63 65 2f 51 45
0005040 50 4d 65 73 73 61 67 69 6e 67 53 65 72 76 69 63
0005060 65 2f 73 65 72 76 65 72 2f 6d 65 73 73 61 67 69
0005100 6e 67 2d 6d 64 62 2f 64 65 70 6c 6f 79 2f 76 65
0005120 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f
0005140 63 74 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f
0005160 64 65 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f
0005200 79 6d 65 6e 74 73 2f 4d 65 73 73 61 67 69 6e 67
0005220 53 65 72 76 69 63 65 2f 51 45 50 4d 65 73 73 61
0005240 67 69 6e 67 53 65 72 76 69 63 65 2f 6d 65 73 73
0005260 61 67 69 6e 67 73 65 72 76 69 63 65 2f 64 65 70
0005300 6c 6f 79 2f 76 65 72 73 69 6f 6e 2f 76 65 72 73
0005320 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74
0005340 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65
0005360 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d
0005400 65 6e 74 73 2f 4d 65 73 73 61 67 69 6e 67 53 65
0005420 72 76 69 63 65 2f 51 45 50 4d 65 73 73 61 67 69
0005440 6e 67 53 65 72 76 69 63 65 2f 6d 65 73 73 61 67
0005460 69 6e 67 73 65 72 76 69 63 65 2f 64 65 70 6c 6f
0005500 79 2f 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a 2f
0005520 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d 6d 61 6e
0005540 64 65 72 2f 64 65 70 6f 74 73 2f 52 57 53 2f 64
0005560 65 70 6c 6f 79 6d 65 6e 74 73 2f 44 43 2d 4a 42
0005600 6f 73 73 2f 51 45 50 44 43 2d 4a 42 6f 73 73 2f
0005620 73 65 72 76 65 72 2f 77 65 62 61 70 70 6c 69 63
0005640 61 74 69 6f 6e 73 2f 64 65 70 6c 6f 79 2f 64 63
0005660 73 65 72 76 69 63 65 73 2e 77 61 72 2f 76 65 72
0005700 73 69 6f 6e 2f 76 65 72 73 69 6f 6e 2e 69 6e 66
0005720 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d
0005740 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57
0005760 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 44 43
0006000 2d 4a 42 6f 73 73 2f 51 45 50 44 43 2d 4a 42 6f
0006020 73 73 2f 64 63 73 65 72 76 69 63 65 73 2f 44 43
0006040 53 65 72 76 69 63 65 73 2f 76 65 72 73 69 6f 6e
0006060 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74 69 65 72
0006100 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65 70 6f 74
0006120 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d 65 6e 74
0006140 73 2f 41 70 70 73 43 65 6e 74 65 72 2d 4a 42 6f
0006160 73 73 2f 51 45 50 41 70 70 73 43 65 6e 74 65 72
0006200 2d 4a 42 6f 73 73 2f 73 65 72 76 65 72 2f 77 65
0006220 62 61 70 70 6c 69 63 61 74 69 6f 6e 73 2f 64 65
0006240 70 6c 6f 79 2f 61 70 70 73 63 65 6e 74 65 72 2e
0006260 77 61 72 2f 76 65 72 73 69 6f 6e 2f 76 65 72 73
0006300 69 6f 6e 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74
0006320 69 65 72 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65
0006340 70 6f 74 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d
0006360 65 6e 74 73 2f 41 70 70 73 43 65 6e 74 65 72 2d
0006400 4a 42 6f 73 73 2f 51 45 50 41 70 70 73 43 65 6e
0006420 74 65 72 2d 4a 42 6f 73 73 2f 61 70 70 73 63 65
0006440 6e 74 65 72 2f 76 65 72 73 69 6f 6e 2e 69 6e 66
0006460 6f 0a 2f 6f 70 74 2f 63 74 69 65 72 2f 43 6f 6d
0006500 6d 61 6e 64 65 72 2f 64 65 70 6f 74 73 2f 52 57
0006520 53 2f 64 65 70 6c 6f 79 6d 65 6e 74 73 2f 41 6c
0006540 65 72 74 73 2d 4a 42 6f 73 73 2f 51 45 50 41 6c
0006560 65 72 74 73 2d 4a 42 6f 73 73 2f 61 6c 65 72 74
0006600 73 2f 61 6c 65 72 74 73 2f 76 65 72 73 69 6f 6e
0006620 2e 69 6e 66 6f 0a 2f 6f 70 74 2f 63 74 69 65 72
0006640 2f 43 6f 6d 6d 61 6e 64 65 72 2f 64 65 70 6f 74
0006660 73 2f 52 57 53 2f 64 65 70 6c 6f 79 6d 65 6e 74
0006700 73 2f 41 6c 65 72 74 73 2d 4a 42 6f 73 73 2f 51
0006720 45 50 41 6c 65 72 74 73 2d 4a 42 6f 73 73 2f 73
0006740 65 72 76 65 72 2f 77 65 62 61 70 70 6c 69 63 61
0006760 74 69 6f 6e 73 2f 64 65 70 6c 6f 79 2f 61 6c 65
0007000 72 74 73 2e 77 61 72 2f 76 65 72 73 69 6f 6e 2f
0007020 76 65 72 73 69 6f 6e 2e 69 6e 66 6f 0a
0007035

# 14  
Old 08-04-2014
Is your requirement really to find all files called v.info below /o but only once per immediate subdirectory? You could mangle that with something like:-
Code:
cd /o
for subdir in *
do
   find $subdir -type f -name v.info | head -1
done

.... but the problem there is that you don't have control on which one is actually selected. You could force it to be the first alphabetically by adding a sort like this:-
Code:
cd /o
for subdir in *
do
   find $subdir -type f -name v.info | sort | head -1
done

.... but it doesn't explain why the others are to be ignored. Are they not valid for some reason?

This will, of course, give you a list of files starting ./ so relative to the current directory, i.e. /o and I don't know if this is allowed. We can work around that if needed later.

Can you tell us more about your logic of which to select and which to ignore?




Robin
This User Gave Thanks to rbatte1 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatting output

I have the output like below: DEV#: 9 DEVICE NAME: hdisk9 TYPE: 1750500 ALGORITHM: Load Balance SERIAL: 68173531021 ========================================================================== Path# Adapter/Path Name State Mode Select Errors 0 ... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

2. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

3. Shell Programming and Scripting

Awk help required for formatting digits.

Hi experts, I have two values in the file : For example : partcamt = 72.90 partdamt=27.9 I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is : total value= 0072000027900 Currently I am using the following code : ... (3 Replies)
Discussion started by: nua7
3 Replies

4. Shell Programming and Scripting

Output formatting .

below is a CPU utilization Log for ABC server. However for every 15 minutes it generates 3 CPU values(with interval of 2 sec). Host CPU CPUtotal CPU% time ABC 101.1 2 50.55 14 : 15 ABC 100.5 2 50.25 14 : 15 ABC 100.2 2 50.1 14 : 15 ABC 100.9 2 50.45 14 : 30 ABC 100.5 2 50.25 14 : 30 ABC... (5 Replies)
Discussion started by: pinga123
5 Replies

5. Shell Programming and Scripting

Formatting of output

Hi Experts, I have to create a report for certain audit and my output looks as follows I m trying to format my output to look like Any inputs would be highly appreciated Thanks Syed (5 Replies)
Discussion started by: maverick_here
5 Replies

6. Shell Programming and Scripting

Formatting my output

Dear All, I am new to unix scripting. I need your help to format my output on screen. echo " --------------------------------------------" echo " | My Output |" echo " --------------------------------------------" echo " | A: $A... (5 Replies)
Discussion started by: rahiljavaid
5 Replies

7. Shell Programming and Scripting

Help required with formatting in scripting

Hi Friends, I need to write a script which reads the file and prints them horizontally. For example, the file contains something like x1 x2 x3 x4 x5 my script reads this file as "for i in `cat filename`", but I need an output something like "config file = x1.ccfg,... (3 Replies)
Discussion started by: dineeshkg
3 Replies

8. UNIX Desktop Questions & Answers

Help required with formatting

I would appreciate any help (sed / awk / perl) on the following question. I have the file in the following format. Note that the records are separated by the line that starts with the word "TRACE".I want the 5th and 6th values on the line starting with "TRACE" to be repeated down the file until the... (3 Replies)
Discussion started by: digipak
3 Replies

9. Shell Programming and Scripting

formatting output

Hi need some advice.. #grep -i hostname test.csv (gives the below output) HOSTNAME,name,host_test,,,,,,,, Now I need to format the above output as below. HOSTNAME: name=host_test Any easy way of doing this using awk or sed or printf? (4 Replies)
Discussion started by: balaji_prk
4 Replies

10. Shell Programming and Scripting

Formatting the output

Hi all, Have the following code(1) producing the results(2 & 3). Would like to know if there is a way to format the two reports created in a similar fashion. IE - The first is formatted nicely as a result of the echo "$xmpbdate $xavgs" >> $xmpbrpt However when I attempt to do the same on... (7 Replies)
Discussion started by: Cameron
7 Replies
Login or Register to Ask a Question