Search Results

Search: Posts Made By: JC_1
3,537
Posted By JC_1
Hi methyl, sorry for the ambiguity. What I...
Hi methyl,

sorry for the ambiguity. What I meant by "it" was the first path. I was trying to replace a path within a text file with a different path. I could not get it to work because it involved...
3,537
Posted By JC_1
Hi RudiC, the ls is actually a list of...
Hi RudiC,

the ls is actually a list of subject names that are being replaced within a parameter file that another application is dependent on. As the app processes a particular subject, the...
3,537
Posted By JC_1
Thank you so much for responding. One problem,...
Thank you so much for responding. One problem, though. It is reading $i as characters and not a variable.....
3,537
Posted By JC_1
find and replace a path with sed?
Hi,

I am attempting to find the path /subject/grin* and replace it with /subject/$i
My attempt:
for i in $(ls)
do
sed -e 's:"/subjects/grin.*":"/subjects/$i.*":g'

and several variants with...
4,765
Posted By JC_1
Great - That got it - Thanks! for i in $(ls...
Great - That got it - Thanks!
for i in $(ls mr*); do
STR=$(strings $i | grep MoCoSeries)
mv $i $i$STR
done
4,765
Posted By JC_1
strings MR* | grep MoCoseries ...
strings MR* | grep MoCoseries (actually that works o.k.)

getting that into the filename for files that contain the string is giving me problems. I tried:

STR=strings MR* | grep...
4,765
Posted By JC_1
grep exact string from files and write to filename when string present in file
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck....
6,526
Posted By JC_1
Thank you so much! I'm embarrassed to say I've...
Thank you so much! I'm embarrassed to say I've been struggling with that for 2 days. (I have a hard time asking for help :confused:). On the whole the script is beyond my vocabulary, but could you...
6,526
Posted By JC_1
The file names are random. The extension is the...
The file names are random. The extension is the same (that is probably windows talk - sorry). I want the script to look in each directory and delete the smaller of the two files.
e.g.,

directory...
6,526
Posted By JC_1
Script to Compare file size and delete the smaller
I am pretty new to scripting, so I appreciate your advice in advance.
The problem:

100 directories each containing 2 files that have the same extension with random names. The only attribute that...
Showing results 1 to 10 of 10

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