Search Results

Search: Posts Made By: Kingzy
4,482
Posted By Kingzy
Thanks a lot RudiC! I've been spending some...
Thanks a lot RudiC!

I've been spending some time trying to have a column-wise output, as opposed to row-wise as in your example, but most importantly target specific items in each "array" as well....
4,482
Posted By Kingzy
Bakunin: My apologies for the late reply! ...
Bakunin: My apologies for the late reply!

Your solution looks very promising :b:

I played with it a little bit to get the hang of it.

I hit a roadblock as soon as I replaced "1 2 3 4 5" in...
4,482
Posted By Kingzy
RudiC: Yup I had tried echo $PATH before. Here is...
RudiC: Yup I had tried echo $PATH before. Here is the output with the other commands:

[abc@xyz ~]$ which bash
/usr/bin/bash
[abc@xyz ~]$ whereis bash
bash: /usr/bin/bash...
4,482
Posted By Kingzy
RudiC: Thanks a lot! Changing the bash path did...
RudiC: Thanks a lot! Changing the bash path did the trick, at least on my home machine.

I tried with the following 2 paths:

#/usr/local/Cellar/bash/4.3.33/bin/bash


#/usr/local/bin

...
4,482
Posted By Kingzy
Don: My apologies for the initial lack of info. I...
Don: My apologies for the initial lack of info. I am also using MacOS Sierra.

I also tried running that script on my work shell.

[work@shell ~]$ ./loop.sh
./loop.sh: line 17: typeset: -n:...
4,482
Posted By Kingzy
Hello RudiC, Yes that's what I want, with...
Hello RudiC,

Yes that's what I want, with the correct grouping and all. :)

I am getting the expected output with 'eval' but not so with typeset:

abc@xyz$ ./loop.sh
./loop.sh: line 17:...
4,482
Posted By Kingzy
Hi Don and Bakunin, Thank you both for your...
Hi Don and Bakunin,

Thank you both for your replies and explanations.

Don: It looks like I could accomplish what I want with ksh, except the output would need to be grouped by index as opposed...
4,482
Posted By Kingzy
Variable substitution with arrays
Hi all,

I have a script with the following gist:

declare -a index=(0 1 2 3 4);

declare -a animals=(dog cat horse penguin cow);

declare -a fruits=(orange apple grapes peach mango);
...
3,406
Posted By Kingzy
When I use this instead, for creating an album...
When I use this instead, for creating an album and uploading photos from it:

google picasa create --title "$1" $2/*.png

It still asks me to specify the title, when I want it to be named just...
3,406
Posted By Kingzy
I do not know how to do that :S
I do not know how to do that :S
3,406
Posted By Kingzy
BUMP...
BUMP...
3,406
Posted By Kingzy
Uploading photos to picasa using googlecl w/ single click
Hi.

As you may (or may not) know:
Here is the sample command that I find interesting:

google picasa post --title "Vermont Test" ~/old_photos/*.jpg # Add to an albumSo I am using ubuntu and a...
4,314
Posted By Kingzy
Thx a lot
Hey Thx a lot. It worked as you said.

It left the 'same-filename' files untouched; then I renamed them accordingly. I was still afraid there would again be some kind of snafu with the...
4,314
Posted By Kingzy
Ok, so regardless of the disappearing mp3s thing,...
Ok, so regardless of the disappearing mp3s thing, i noticed that this command:

mv "$i" "`echo $i | cut -d "-" -f2`"

when it comes to a handful of mp3s, somehow most of their filename is erased....
4,314
Posted By Kingzy
Vanishing MP3s
Thanks everyone for your suggestions. They all worked, as far as the script itself is concerned, but I encountered one issue:

I've got like 6 folders (albums) from that same artist, with mp3s of...
4,314
Posted By Kingzy
Thanks a lot! It effin worked. Only 1 second to...
Thanks a lot! It effin worked. Only 1 second to do its deed... Sh really owns all these <expletive removed> software :)

---------- Post updated at 10:30 PM ---------- Previous update was at 10:09...
4,314
Posted By Kingzy
Need help to mass rename files
Hi.

I've got 75 mp3s that have the word 'Émission' in their filename.

They are all in this format:

Émission bla1 bla1.mp3
Émission bla2 bla2.mp3
Émission bla3 bla3.mp3
etc...

I would just...
14,622
Posted By Kingzy
So i entered this in the command line: lame...
So i entered this in the command line:

lame --mp3input hello hello1

and it worked. The output file was fine when i put back the mp3 extension. Thanks a lot.

But, in my script, i already...
14,622
Posted By Kingzy
Yes it cares about the extension. I tried this: ...
Yes it cares about the extension. I tried this:

lame hello hello.mp3and i got 'Warning: Unsupported audio format' even though 'hello' is of mp3 format.

I would just like to replicate the...
14,622
Posted By Kingzy
I tried your solution and it only saved my 2 test...
I tried your solution and it only saved my 2 test files (Hello1.wav and Hello2.wav) in ~/Documents as *.wav.mp3 files, still in ~/Documents.

I tried putting the idea from your code into my...
14,622
Posted By Kingzy
Here is the code: #!/bin/bash cd...
Here is the code:

#!/bin/bash

cd ~/Documents

for file in *.wav;
do lame "$file";
done

for i in *.mp3; do
mv "$i" ~/Documents/newmp3s
done
14,622
Posted By Kingzy
Help with 'batch conversion using lame' shell script
Hi.

I am trying to write an sh script that will:

1. take each wav file in ~/Documents
2. convert each into mp3 format using "lame" encoder
3. save the new mp3 in ~/Documents/newmp3s.

It...
2,210
Posted By Kingzy
I actually tweaked the command and instead put ...
I actually tweaked the command and instead put

trap "tput sgr0" exit EXITas the reset command was too radical :)
...
2,210
Posted By Kingzy
hey thx alot !!! it actually also solved what...
hey thx alot !!! it actually also solved what would have been my next question.

I also wanted to know how to make my script exit anytime i entered 'exit' without doing nested ifs mumbo jumbo coz i...
2,210
Posted By Kingzy
Need help getting rid of bold characters
Hi!

So i've got this shell script that asks questions and the user is required to input answers. The answers typed are bold.

sh-*.*$ sh filename dir
cat question
tput bold
read ans
tput...
Showing results 1 to 25 of 25

 
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy