Search Results

Search: Posts Made By: agentgrecko
19,929
Posted By hanson44
Are you sure it's one to two files per second? ...
Are you sure it's one to two files per second?
$ ls | wc
1993 1993 34863
$ time find . -name "*.*" -type f | xargs -I '{}' mv {} ../xxx
real 0m2.846s
user 0m0.668s
sys ...
19,929
Posted By RudiC
Were /source/dir and /destination/dir on the same...
Were /source/dir and /destination/dir on the same file system, mv would just rename the files and not move a single byte.
Hadn't you said new files drop in constantly, I'd have tried to rename the...
2,281
Posted By clx
Try .. awk 'NR==FNR...
Try ..

awk 'NR==FNR {r[$1]=$0;d_start[$1]=$2;d_end[$1]=$3;last_col[$1]=$7;next} ($1 in r) && d_start[$1] <= $3 && d_end[$1] >= $3 { print $0, d_start[$1], d_end[$1], last_col[$1]}' lookup_file...
14,003
Posted By pludi
First of all: what OS, what shell, ... Second:...
First of all: what OS, what shell, ...
Second: how about putting the line in a script?
2,104
Posted By Corona688
tr is much, much, much better suited for this...
tr is much, much, much better suited for this than sed. No tricks are required to prevent repeat substitution and you feed it the sets directly.

$ echo 123456789 | tr '[12345]' '[58719]'...
2,104
Posted By in2nix4life
Telling sed that the second number 5 is at the...
Telling sed that the second number 5 is at the end of the string works:


echo 12345 | sed -e 's/1/5/g;s/2/8/g;s/3/7/g;s/4/1/g;s/5$/9/g;'

58719


Hope this helps.
2,104
Posted By zaxxon
See ahamed's post above. I hope this is not being...
See ahamed's post above. I hope this is not being used for encrypting ;) Having several tries you will easily guess which number translates to which so this does not really look suited for a...
2,104
Posted By ahamed101
You can use the sed's transform feature for...
You can use the sed's transform feature for this...

echo 12345 | sed 'y/12345/58719/'
--ahamed
Showing results 1 to 8 of 8

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