Questions tagged [expansion]
32 questions
121
votes
5 answers
how to expand aliases inline in bash?
Is there a way to expand aliases inline in bash?
$bash>alias ll='ls -l '
$bash>ll
$bash>ls -l
asdfg
- 2,936
36
votes
2 answers
What is the brown slot near the CPU socket on a Pentium 1 motherboard, and what is it used for?
What is this slot called and what is it for on a Pentium 1 motherboard?
Here I give you the Asus P/I-P55T2P4 rev 2.1 board:
Thraka
- 588
24
votes
4 answers
Is it possible to print out the shell expansion?
I know there is a specific set of rules that shell expand the commands user typed. (let's talk about bash shell.)
Is it possible to print out a command in the form after shell expansion? It seems to be a good utility to learn and make sure how shell…
Weishi Z
- 343
14
votes
3 answers
What is the meaning of asterisk, backslash, colon and two in (*\:2)?
What is the meaning of following ls command?
ls -l *\:2,*T
ls = list
-l = long (list)
*T probably means T at the end
But what about that *\:2 and the comma?
Jürgen Gmach
- 259
12
votes
4 answers
Brace expansion : run several commands instead of expanding on one line?
When you use brace expansion in bash, something like
echo {a,b,c}
becomes
echo a b c
Is there a way to expand it to 3 separate commands, one for each expansion, instead?
So that:
echo {a,b,c}
would become
echo a
echo b
echo c
houbysoft
- 4,444
10
votes
2 answers
Can I keep . and .. out of .* expansion?
I often find it annoying (or worse) when I type
command .*
in bash and the command applies to the parent directory and current directory. Is there some shell option or other configuration I can tweak to make bash exclude . and .. from the expansion…
David Z
- 6,785
6
votes
2 answers
Is a PCIE X1 card for USB 3.0 worth it?
I have a portable HDD on USB 3.0, and soon I'll have a 32gb flash drive on USB 3.0 as well.
My motherboard is pretty old - and the next time I'll upgrade it is when I get a new CPU/mobo/ram.
Slots on my mobo:
PCIE X16 - For my GTX 260
2xPCI
PCIE…
Amir
- 183
4
votes
1 answer
Is it safe to stop a RAID 5 expansion?
I'm having some issues expanding a RAID 5 array on a Synology DS413. The drive has gone from 3 x 3TB WD Green drives to 4 x 3TB. I started an expansion operation and it's been stuck at about 60% and extremely slow speeds for a week (about 350Kb/s…
Tom Maitland
- 141
3
votes
2 answers
Bash parameter Expansion: Best practices for speed?
I was just wondering if anybody knows any best practices or if there is any documentation about this topic:
The scenario is searching / grepping in the log files. To make my point I will use ls. So let's say that I run ls to list a series of files…
runlevel0
- 1,070
3
votes
2 answers
Expand Synology SHR volume with varying disk sizes
I'm looking for a clarification on SHR and how it handles expanding a volume when the volume contains varying disk sizes.
I've read the Synology Documentation and it still isn't clear, because their use-case assumes that the original volume was…
rabhw
- 31
2
votes
0 answers
How do I properly architect my home network expansion?
I have FIOS verizon on 1 router w/wifi connected to 6 wireless devices, 1 network printer & 3 wired computers. I want to add to my network, NAS storage (cloud access), 4 FIOS TV'S, Home Theatre, thermostats, security systems, security cameras, etc…
Frank L Day
- 21
2
votes
2 answers
duplicate a single file to a list of files
I'd like to know if it is possible to duplicate a single file to multiple files with a different list of arguments.
I have a generic image and I need to make multiple copies of it adding a different country extension to each copy.
I tried…
Yannick Schall
- 123
2
votes
1 answer
VS Code does not expand variables in its settings
Is it the expected behaviour that VS Code does not expand variables in its settings?
My example: I need to configure Remote.SSH: Config File to point to a file relative to my home directory. Verbatim values…
2
votes
1 answer
Old school boom box input equivalent using SoX
I used to have a cassette tape/radio unit (boom box format) device.
I used to use this to record mix tapes from my dual turntable and mixer setup. The resulting tapes were - for me - ideal for playing in the car because
The tape itself ran a tad…
AlanT
- 21
- 1
2
votes
1 answer
Find substring from a array of patterns
I have a file with extensions:
f1=f1.e1.e2.e3.sh.pl.cpp
I have an array containing a list of extensions:
exts=(sh pl py)
I want to remove the extensions in exts from the filename's. Is there a trick to do it, I'm thinking of something of this…
kaligne
- 269