Search Results

Search: Posts Made By: Hesiod
1,200
Posted By Hesiod
Edit last parameter in a file
I have a script in which I am trying to move some files.

find DIR1|awk -F/ '{print "mv " $0, $0}'|sed -e "s/${DIR1}/&.OLD/g" -e 's/.OLD//'

which gives me:

mv DIR1/abc DIR1.OLD/abc
mv...
5,357
Posted By Hesiod
OK - will remember that. Thanks for your help.
OK - will remember that. Thanks for your help.
5,357
Posted By Hesiod
Great - both solution worked. Thanks for your...
Great - both solution worked. Thanks for your help - but could you tell me why the second solution is more efficient than the first? I've got into the habit of using for loops.
5,357
Posted By Hesiod
BACKUP is a variable set globally at login - it's...
BACKUP is a variable set globally at login - it's not in /etc/profile, but all users process a login script that sets this and other variables.
5,357
Posted By Hesiod
For loop using input file doesn't expand variables
Hi,

I'm using a for loop reading from an input file that contains files, whose path includes a variable name.

But the for loop doesn't expand the variable and therefore can't find the file.
...
Showing results 1 to 5 of 5

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