9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Experts - Any advice on how to get a hash value in a foreach loop?
Values print correctly on standalone print statements, but I can't access value
in foreach loop.
See sample code below and thanks in advance.
foreach my $z (sort keys %hash) {
for $y (@{$hash{$z}}) {
print "$z... (6 Replies)
Discussion started by: timj123
6 Replies
2. UNIX for Dummies Questions & Answers
It's been a while since I used csh formatting and I am having a little bit of trouble with a few things. Things seem so much easier to execute in Matlab, however I need to do this on the terminal because of the programs I am trying to interact with.
So here's what I want to do: I have a file... (0 Replies)
Discussion started by: katia
0 Replies
3. Shell Programming and Scripting
My script is as below:
my $tile_list = `egrep "FCFP_TILE_LIST.*=" ${BudgetDir}/tile.params | sed -e 's/FCFP_TILE_LIST//' | sed -e 's/=//'`;
print "Tile List = ".$tile_list."\n";
my @tiles = split(/\s+/, $tile_list);
$unconst_out = "${DestDir}/Unconstrained_ports.rpt";
$check_tim_out =... (2 Replies)
Discussion started by: kuchi7
2 Replies
4. Shell Programming and Scripting
Can any one please help I am trying to sort each item in every line and count the common (non case sensitive) and at the end printing all the unique alphabetically.
Here is what i did ... I can print all the lines but struck to sort each line some were:
I am getting the output as:
I... (5 Replies)
Discussion started by: sureshcisco
5 Replies
5. Shell Programming and Scripting
How can I nest substitutions ? My solution just seems cheap ...
sample data
Cisco Catalyst Operating System Software, Version 235.5(18)
Cisco Catalyst Operating System Software, Version 17.6(7)
Cisco Catalyst Operating System Software, Version 19.6(7)
Cisco Catalyst Operating System... (1 Reply)
Discussion started by: popeye
1 Replies
6. Programming
Hello All,
Im a Hardware engineer, I have written this script to automate my job. I got stuck in the following location.
CODE:
..
..
...
foreach $key(keys %arr_hash) {
my ($loc,$ind,$add) = split /,/, $arr_hash{$key};
&create_verilog($key, $loc, $ind ,$add);
}
sub create_verilog{... (2 Replies)
Discussion started by: riyasnr007
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have thousands of files in a directory that have the following 2 formats:
289620178.aln
289620179.aln
289620180.aln
289620183.aln
289620184.aln
289620185.aln
289620186.aln
289620187.aln
289620188.aln
289620189.aln
289620190.aln
289620192.aln....
and:
alnCDS_1.fasta (1 Reply)
Discussion started by: greptastic
1 Replies
8. Shell Programming and Scripting
I am scripting in tcsh and here is what I currently have:
foreach group (g1 g2 g3 g4)
set ppl = `cat $group.file.with.list.of.ppl.in.row.format`
set label = 1
@ label += 1
foreach ppls ($ppl)
echo $label >> file
end
end
... (0 Replies)
Discussion started by: bonesy
0 Replies
9. Shell Programming and Scripting
i've reworked some code from an earlier post, and it isn't working as expected
i've simplified it to try and find the problem. i spent hours trying to figure out what is wrong, eventually thinking there was a bug in perl or a problem with my computer. but, i've tried it on 3 machines with the... (5 Replies)
Discussion started by: quantumechanix
5 Replies