BAEL-3110 - Linux Commands - Remove All Text After X (#7867)
* BAEL-3132 - Linux Commands - Loop Through Directories/Folders * BAEL-3132 - Linux Commands - Loop Through Directories/Folders - update pom description. * BAEL-3132 - Linux Commands - Loop Through Directories/Folders - Add another example using find exec. * BAEL-3132 - Linux Commands - Loop Through Directories/Folders * BAEL-3110 - Linux Commands - Remove All Text After X
This commit is contained in:
parent
6c2f862dcb
commit
9ad7ed0e2f
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
my_var="Hola Mundo"
|
||||
echo ${my_var}
|
||||
|
||||
my_filename="interesting-text-file.txt"
|
||||
echo ${my_filename:0:21}
|
||||
|
||||
echo ${my_filename%.*}
|
||||
|
||||
complicated_filename="hello-world.tar.gz"
|
||||
echo ${complicated_filename%%.*}
|
||||
|
||||
echo ${my_filename/.*/}
|
||||
|
||||
echo 'interesting-text-file.txt' | sed 's/.txt*//'
|
||||
|
||||
echo 'interesting-text-file.txt' | cut -f1 -d"."
|
||||
echo ${complicated_filename} | cut -f1 -d"."
|
Loading…
Reference in New Issue