LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2012, 04:25 PM   #1
eprait01
LQ Newbie
 
Registered: Feb 2012
Location: Cyprus
Posts: 5

Rep: Reputation: Disabled
Programming Help


hi again... i want somebody to help me!
i try to find from an array that it has urls , the urls that has 2 "/" or 3 or a number thaht i want.
my code find only 2 "/"

my code is :

let m=1
let new=0
let counter=0
while [[ m -lt ${#ARRAYRIGHTWITHLINKS[*]} ]];
do
n_fields=`echo ${ARRAY_FOR_TEST[m]} | tr '/' '\n' | wc -l`
nn=$(( $n_fields -1 ))


if [[ n -eq $DEPTH ]]; then
ARRAY_TIS_KOKONAS[new]=${ARRAYRIGHTWITHLINKS[m]}
echo -n "I $new osti thesi tou pinaka (ARRAY_TIS_KOKONAS):"
echo ${ARRAY_TIS_KOKONAS[new]}
((new++))

fi
((m++))
done
fi
 
Old 02-27-2012, 04:31 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
eprait01,

You have now posted this question in multiple unrelated threads. I've removed the duplicates and moved this post into its own thread. In the future, please refrain from double posting and hijacking other members' threads. Welcome to LQ.

--jeremy
 
Old 02-27-2012, 04:40 PM   #3
eprait01
LQ Newbie
 
Registered: Feb 2012
Location: Cyprus
Posts: 5

Original Poster
Rep: Reputation: Disabled
hi.. just i used it once time here.. i do not lernt yet :/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration