LinuxQuestions.org
Visit Jeremy's Blog.
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


Closed Thread
  Search this Thread
Old 04-08-2017, 09:45 AM   #31
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,951

Original Poster
Rep: Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146

Quote:
Originally Posted by NevemTeve View Post
going to make a liar out of me aren't you? I already said I was not going to post in here anymore.

The precious test script you insisted you had to have or you could not evaluate anything by using anything that I already posted.
Code:
#!/bin/bash

working_dir=/media/data/Deluge_Done
script_dir="~/scripts"

set -x


# to egt the file name so I can rename it
find "$working_dir" -type f  -name '*.flac'  | while read FILENAME
do

#get path - file name - extension

		f=$FILENAME
		path=${f%/*}
		xfile=${f##*/}
		title=${xfile%.*}
		ext=${xfile##*.}

#Set newFile name for converted flac to mp3

[[ "${ext}" == 'flac' ]] && NewFile="$title"."mp3"

[[ -f "${script_dir}"/"${NewFile}" ]] && resampledFileLoc="${script_dir}"/"${NewFile}"

printf "resampledFileLoc --> $resampledFileLoc\n"

exit 0

done
the test results
Code:
userx@slackwhere⚡~/scripts $./test-prove-point-script
+ find /media/data/Deluge_Done -type f -name '*.flac'
+ read FILENAME
+ f='/media/data/Deluge_Done/1979 - Public Image Ltd. - Metal Box [Virgin Vinyl 24-96 FLAC][2009][Kel Bazar]/01 - Albatross.flac'
+ path='/media/data/Deluge_Done/1979 - Public Image Ltd. - Metal Box [Virgin Vinyl 24-96 FLAC][2009][Kel Bazar]'
+ xfile='01 - Albatross.flac'
+ title='01 - Albatross'
+ ext=flac
+ [[ flac == \f\l\a\c ]]
+ NewFile='01 - Albatross.mp3'
+ [[ -f ~/scripts/01 - Albatross.mp3 ]] <----------
+ printf 'resampledFileLoc --> \n' <----------
resampledFileLoc --> <----------
+ exit 0
My Original post showing the error

Code:


now comes the check to insure that a file was re-sampled
Code:

 
+ [[ -f ~/scripts/01 - Albatross.mp3 ]] <----------
#
#  It tested true but did not set the variable The next line proves it. 
#
+ printf '\n\n\ resampledFileLoc --> \n\n\n\n' <----------
\ resampledFileLoc --> <----------

#
# nothing was inside of it 
#
+ [[ ! -z resampledFileLoc ]]
+ [[ -d '' ]]
+ [[ ! -z resampledFileLoc ]]
+ [[ -d '' ]]

do you notice any similarities whatsoever?

again that is a waste of my time to have done as you requested. As I stated WHY just so you can see the very same results of what I already posted?


again here is someone that surely does not need to live by someone else rule that obviously is not a complete true (brief) statement.


Quote:

where
Quote:
Quote:
Originally Posted by michaelk View Post
Code:
script_dir="~/scripts"
With quotes the ~ is not being expanded to /home/username.
michaelk picked up on it. using what I gave out. That set me in the right direction to going back to using absolute path instead.
that made up requirement came from some lazy A$$ half baked thought.

so who now needs to recalibrate their belief system?

Last edited by BW-userx; 04-08-2017 at 10:24 AM.
 
Old 04-08-2017, 12:07 PM   #32
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,407
Blog Entries: 11

Rep: Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359
Quote:
Originally Posted by BW-userx View Post
again that is a waste of my time to have done as you requested. As I stated WHY just so you can see the very same results of what I already posted?
...
again here is someone that surely does not need to live by someone else rule that obviously is not a complete true (brief) statement.
...
that made up requirement came from some lazy A$$ half baked thought.

so who now needs to recalibrate their belief system?
BW-userx, rude and insulting remarks, personal attacks and namecalling WILL NOT BE TOLERATED in this forum.

You consider it a waste of your time to provide simple answers to direct questions, yet you waste the time of everyone else who is trying to help you by not responding to their requests for ordinary clarification of your problem.

Please see, again, then basic rules of the forum, inclucing this:

Quote:
If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere.
 
Old 04-08-2017, 12:18 PM   #33
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,951

Original Poster
Rep: Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146
Quote:
Originally Posted by astrogeek View Post
BW-userx, rude and insulting remarks, personal attacks and namecalling WILL NOT BE TOLERATED in this forum.

You consider it a waste of your time to provide simple answers to direct questions, yet you waste the time of everyone else who is trying to help you by not responding to their requests for ordinary clarification of your problem.

Please see, again, then basic rules of the forum, inclucing this:
where were my remarks rude?

I was just pointing out truths.

I provided a proof to a remark to me that his request was not valid. where he kept on insisting that is was.

So I gave him Proof that No it was not valid that in fact he was in error of his thinking

where is the rudeness in that?

to prove someone wrong is not being rude

as far as this goes
"that made up requirement came from some lazy A$$ half baked thought."

it was to the one that made up that "rule" no one here in LQ did it that was from another web sight
stackoverflow

motivational psychology tells me that it was someone that is too lazy to put the effort into it themselves.
as well as if a person provides what I did then that does not need to be done. if at all. as I put forth proof to that effect.

that was a comment about some one that is not even in LQ but stackoverflow ....

Last edited by BW-userx; 04-08-2017 at 12:44 PM.
 
Old 04-08-2017, 01:08 PM   #34
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,951

Original Poster
Rep: Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146Reputation: 2146
@astrogeek

further more

Quote:
again here is someone that surely does not need to live by someone else rule that obviously is not a complete true (brief) statement.
that is a true statement as the user who is a moderator user name michaelk
figured it out without having me rewite an enter bash script to only show the same error as before it'd had been rewritten.


therefore that is a truth

please explain to me how telling the truth in your book as someone that is being rude?


Quote:
...
that made up requirement came from some lazy A$$ half baked thought.
that is about someone in stack exchange web sight ... let him defend himself if he wants to to me.
Quote:
so who now needs to recalibrate their belief system?

that is a question not a statement for one.

please explain to me how a question is being rude to someone in your book?

if someone makes a mistake in codding it is because they believed what they were doing was right.

then that someone comes in here and asks why is what I believe to be right not working?

others look at the problem see the error then corrects them because they where in error of their thinking that is why they were getting errors in their code.

so someone recalibrate that persons belief system by correcting them and showing them their errors and how to fix them


I did the same with not code but ones thinking


their is no difference in the methodology whatsoever only where it has been ap;plied.

where is the rudeness in showing ones fellow man their errors in thinking so they will no longer be in error of themselves in what they do, be it in what they are coding or how they are communicating to others?

because coding is too a form of communication same as someone communicating to another by whatever means.


It was a Question not a statement meant to bring a thought to someones mind After showing them their error in thinking .. that perhaps they need to rethink their belief about what one HAS to do for him in order to get him to be able to get the very same results that michaelk got when he did not have to have the same information given to him.

that being an entirely different script that will only reproduce the exact same error that I showed already and the code that did it.


all having to be put into a different bash script to get the exact same results. why ?

because that persons thinking is in error and it came from his belief system if you know how a belief system works that would help . I will explain that to you to help you better understand what it is that really happened here.

it is because that person held the belief that I ( and others) have to rewrite the code into a different file so that it only shows that one error so the one looking at the code that is throwing the error can be found easier.

an act of laziness because they do not want to have to go through all of that code to try and find it.

when a real coder has to.

I proved what was needed and then asked to give more.



if one picks out what is causing it and the error as a result of it. then no entirely new file is needed to be created.

I do not see this request for every question in Linux Questions for everyone that provides a question on why is this erroring on me?


so why is it that when I get this request more then once to the point I feel the need to show that person that his requested is invalid and prove it. then put to question that perhaps someone is in need to rethink what it is that they believe to be e truth when in fact it is not

because I proved it that it is not a necessary.

therefore proving that that belief is not a absolute truth.

to try and help someone in their thinking

that is all that was and that is it

and you see it as being RUDE?

Why?

Last edited by BW-userx; 04-08-2017 at 01:15 PM.
 
Old 04-08-2017, 01:36 PM   #35
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,407
Blog Entries: 11

Rep: Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359Reputation: 3359
This is neither a courtroom nor a kindergarten where we play games of, "Did too! Did not! Did too! Did not!", verbal misdirection and laying of blame.

This is a technical forum where we operate on a fully adult, respectful and cooperative level.

Please demonstrate that you are willing to do so.

This thread is now closed.
 
3 members found this post helpful.
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What's wrong with this bash script L_Carver Ubuntu 15 11-06-2016 02:40 PM
[SOLVED] What is wrong with my bash script? HalfEmptyHero Programming 2 08-02-2011 04:03 PM
What am I doing wrong in this bash script ? bashprog Programming 4 10-10-2010 07:19 PM
help with Bash script (test) Benanzo Linux - Software 1 04-09-2007 03:18 AM
My first BASH script, what's wrong with it? szf2 Linux - Newbie 2 11-12-2003 01:43 PM

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

All times are GMT -5. The time now is 07:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration