Search Results

Search: Posts Made By: shellscripting
5,415
Posted By droopy4u
ASCII vs ISO
Correct the (old) ASCII code is a 7-bit (1 byte = 8 bits).
More information : https: //www.cs.tut.fi/~jkorpela/chars.html

But depends on your charactersettings of your system.



Source :...
5,415
Posted By bakunin
IMHO you are foregoing something in your...
IMHO you are foregoing something in your character count:

# cat file
hello

# wc -c file
6 file

# od -ax file
0000000 h e l l o lf
6865 6c6c 6f0a...
1,597
Posted By Scrutinizer
I did the following test with bash: Terminal...
I did the following test with bash:

Terminal 1:$ while :; do sleep 1; done &
[1] 46950
$
Terminal 2:$ shopt -s huponexit
$ while :; do sleep 1; done &
[1] 46988

Terminal 3:$ ps -ef | grep...
1,353
Posted By Scrutinizer
You do not need to export the variable, you can...
You do not need to export the variable, you can also use it locally, like so:
LC_ALL=C sort file
1,353
Posted By cero
The sort order (of the GNU sort command) is...
The sort order (of the GNU sort command) is determined by the locale you specified in your environment:
$ export LC_ALL=en_US.utf8
$ sort s.txt
aaa
AAA
bbb
ddd
eee
ggg
GGG
$ export...
865
Posted By junior-helper
# grep "\([\"']\).*\1" file
# grep "\([\"']\).*\1" file
865
Posted By Scrutinizer
The back reference in grep an only be used as...
The back reference in grep an only be used as part of the matching. So the first expression would look for a string hello.*hello
The second expression would look if a string between quotes is...
796
Posted By Scrutinizer
Try: awk 'NR==FNR{getline v<f; A[$1]=v; next}...
Try:
awk 'NR==FNR{getline v<f; A[$1]=v; next} $1 in A { $2=A[$1] }1' f=file3 file2 file1
or
paste file2 file3 | awk 'NR==FNR{A[$1]=$2; next} $1 in A { $2=A[$1] }1' - file1
or if with...
Showing results 1 to 8 of 8

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