LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-16-2017, 12:35 PM   #61
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242

Quote:
Originally Posted by justmy2cents View Post
The example I gave was just an example.. I really want to do this:

LINE 9: cp -r /media/xubuntu/88D3-A937/Config/.* /home/xubuntu1
LINE 10: ^/home/xubuntu1^/root

This I think is cleaner as it's 50% shorter than typing: cp -r /media/xubuntu/88D3-A937/Config/.* /root

But I think something needs to be escaped or quoted? Im not sure..
1. where did you get this information to do that? show me some documentation on it.
2. your brain just told you it thinks it could be an escape of quotes needed.
my brain told you, "I do not know this ^com^com" therefore, I have no idea about that command. Follow your brain and be the programmer you want to be. I already explained to you twice how to do this.

Write a separate bash script and experiment with it until you get it to work then add it to your entire script when you get it working. this helps you learn and keep that in your memory better.
 
1 members found this post helpful.
Old 05-16-2017, 01:01 PM   #62
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
The example quote I gave is all the documentation I have on it as well. I got it from a physical copy of a Linux commands type book, under the "using Bash/Zsh command completion" section.. It's just a type of command completion.. I think it has to do with history expansion, so im going to look into that.. Thanks dude ill keep in mind your advice; read it over, and test it out, follow your gut, etc.. Thanks

Last edited by justmy2cents; 05-16-2017 at 01:17 PM.
 
Old 05-16-2017, 01:25 PM   #63
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by justmy2cents View Post
The example quote I gave is all the documentation I have on it as well. I got it from a physical copy of a Linux commands type book, under the "using Bash/Zsh command completion" section.. It's just a type of command completion.. I think it has to do with history expansion, so im going to look into that.. Thanks dude ill keep in mind your advice; read it over, and test it out, follow your gut, etc.. Thanks
OOOOO I C

that is Zsh I use bash perhaps this is why I was not getting anything good, just a 'bad substitution' error. I use BASH well this Void Linux using dash actually. Bash is in Slackware.

Oh lookie googled "Zsh command completion"

http://zsh.sourceforge.net/FAQ/zshfaq04.html

http://zsh.sourceforge.net/Doc/Relea...on-System.html

that is what you need to be reading up on if you are going to be using Zsh

Last edited by BW-userx; 05-16-2017 at 01:27 PM.
 
Old 05-16-2017, 02:02 PM   #64
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
I did do some "light" searching on the subject of difference between Zsh and Bash scripting.. Basically I found that Zsh has most features of bash, but in many cases with a different syntax. ... Now that I think of it I bet it doesn't work cause I use the bash shebang... Anyways I use Zsh as it supposedly favors the power user, and is someone smarter than bash (also probably less targeted by malware coders). Also someone said and I quote: "I've found the syntax of zsh really close to the one of bash, and I did not pay attention if there was really some incompatibilities. I switched 6 years ago from bash to zsh seamlessly".

Last edited by justmy2cents; 05-16-2017 at 02:10 PM.
 
Old 05-16-2017, 02:25 PM   #65
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Hyperpolyglot
Unix Shells: Bash, Fish, Ksh, Tcsh, Zsh

http://hyperpolyglot.org/unix-shells
 
2 members found this post helpful.
Old 05-16-2017, 02:39 PM   #66
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by BW-userx View Post
Hyperpolyglot
Unix Shells: Bash, Fish, Ksh, Tcsh, Zsh

http://hyperpolyglot.org/unix-shells
Awesome thanks for that ima have to print that one out!
 
Old 05-18-2017, 05:02 PM   #67
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by justmy2cents View Post
Now that I think of it I bet it doesn't work cause I use the bash shebang.
Yes. Using the bash shebang makes it use the bash shell, not the zsh shell. By definition.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Shell Script Help! ChrisJames82 Linux - Newbie 11 11-07-2016 12:51 PM
Calling a bash shell script from within another script dedman Linux - Software 7 04-24-2010 08:53 PM
in bash shell how to run shell script during startup rammohan04 Red Hat 2 07-31-2009 02:07 AM
bash shell script globeTrotter Linux - Newbie 5 06-03-2004 05:07 AM
bash shell script MaryM Linux - Newbie 0 02-15-2002 11:45 PM

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

All times are GMT -5. The time now is 01:53 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