output formatting
formatting
padding
[!NOTE|label:references:]
solution
printf
padRight
[!NOTE] references:
ASCII | CHARACTER |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
or
or
.join()
alike in shell
.join()
alike in shellls -m
show all line numbers in a file
cat
awk
get the common part
[!NOTE|label:see also:]
revert a string
format a file to a table
[!NOTE|label:see also:]
convert multiple line into one
[!NOTE|label:see also:]
others
file ending crlf or lf
[!NOTE]
cat -e
dos2unix
grep
[!TIP]
grep -lU $'\x0D' * | xargs ...
can be
od -c
hexdump -c
convert dos to unix
insert into the first line
find and copy
get the count of a word in a file
print 50th char
show last n lines in a file
shell parameter expansion for string
replace
** for bash only ** usage:
${parameter/pattern/string}
replace the first occurrence of a pattern with a given string${parameter//pattern/string}
replace all occurrencesreference:
not supported in all Unix Shells: the Shell & Utilities volume, §2.6.2 "Parameter Expansion"
Last updated