Search Results

Search: Posts Made By: Alyssa
1,179
Posted By itkamaraj
grep -l "DUMMY_B" *; while read file; do echo cp...
grep -l "DUMMY_B" *; while read file; do echo cp $file newdirectory/; done


remove the echo, if you are fine with the output
1,179
Posted By AmazingTyagoman
grep "DUMMY_B" *; cp -p /targetdirectory. ...
grep "DUMMY_B" *; cp -p /targetdirectory.

Lol I hope it would help :)
1,396
Posted By pamu
try with awk.. awk -F, '{if($2 ~ /AAA/)...
try with awk..


awk -F, '{if($2 ~ /AAA/) {$2="AAAdummy"}else if($2 == "" && NF > 2) { $2 = "dummy"}}1' OFS=, file


with sed....


sed 's/AAA[a-zA-Z0-9\t]\+,/AAAdummy,/; s/,,/,dummy,/' file
1,396
Posted By elixir_sinari
sed '3s/dummy/&A/' yourfile > temp mv temp...
sed '3s/dummy/&A/' yourfile > temp
mv temp yourfile
1,396
Posted By pamu
is this only one change..? use sed sed...
is this only one change..?

use sed

sed 's/dummy/dummy_01/g'


need some more details if this you don't want..
1,185
Posted By rdrtx1
grep "PDT_AP21_B" infile >...
grep "PDT_AP21_B" infile > another_file
Showing results 1 to 6 of 6

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