Search Results

Search: Posts Made By: Cacializ
1,496
Posted By Cacializ
Why is editing a file by renaming the new one safer?
Hello:
I've been reading about ways to edit files from the command line, and I've found two websites which state that the following is the safest way to edit a file:
command original > new
mv new...
1,997
Posted By Cacializ
I see. Well, on the one hand it's good they're...
I see. Well, on the one hand it's good they're available in regular expressions but it would be convenient to have them available as globs as well, especially for characters that I can't easily type...
1,997
Posted By Cacializ
I see. I was aware GNU sed had issues with...
I see. I was aware GNU sed had issues with multi-byte characters, like I mentioned in my first post. I was just confused why it didn't work on Solaris either.



This works! I forgot sed you can...
1,997
Posted By Cacializ
Here's the output shown in Debian: $ for class...
Here's the output shown in Debian:
$ for class in $(
> locale -v LC_CTYPE |
> sed 's/combin.*//;s/;/\n/g;q'
> ) ; do
> printf "\n\t%s\n\n" $class
> done

upper


...
1,997
Posted By Cacializ
I've tried with /usr/xpg4/bin/tr,...
I've tried with /usr/xpg4/bin/tr, /usr/xpg6/bin/tr and even changing the shell to /usr/xpg4/bin/sh, but none of them worked.

Oddly, the example I provided appears in the examples section of the...
1,997
Posted By Cacializ
Equivalence classes don't work
Hello:
I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, [=e=] matches e, é, è, ê, etc. But when using them with utilities like tr they don't...
2,383
Posted By Cacializ
This is exactly what I needed, Scrutinizer. Thank...
This is exactly what I needed, Scrutinizer. Thank you very much! The tabs don't seem to be altered with the command you provided, so I don't think I'll need to add them.

One last question. I'm...
2,383
Posted By Cacializ
Edit lines in file preserving part of it
Hello:
I have the following HTML table:
<table>
<thead>
<tr>
<th>Code</th>
<th>Percentage</th>
</tr>
</thead>
<tbody>
<tr>
...
2,625
Posted By Cacializ
Yes, if there were 8 files it would leave the...
Yes, if there were 8 files it would leave the oldest file intact. That's why the script makes the check before backing the ACLs up. In practice the script will use a directory where nothing else will...
2,625
Posted By Cacializ
Help with rotating files
Hello:
I have a script that gets the ACLs of the /home directory and its contents with getfacl and writes them to a file. The script is run by a cron job and I don't want it to rewrite or append to...
2,630
Posted By Cacializ
This is something I always do. Like I said, the...
This is something I always do. Like I said, the variables contain the path to existing directories. They're checked before using the mv, but I skipped that part in order to focus on the permissions...
2,630
Posted By Cacializ
What's the best way to check file permissions before moving files if needed?
Hello,
I would like to know if it's a good practice to check the file permissions of the contents of a directory before moving them. For example:
mv -- "$directory"/* "$directory"/.[!.]*...
Showing results 1 to 12 of 12

 

Featured Tech Videos

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