i do get some text files that i'd lile to clean them up based on following rule: if a line starts with " then remove return (new line, carriage return) before ".
Example, my input text file
I'd like this to come as
How can i achieve this?
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 01-20-2017 at 03:48 PM..
Reason: Added CODE tags.
I am trying to add a unique string to a variable to prevent some name space collisions.
DATAFILE=/u001/app/unica/affinium644/campaign/partitions/limited/tmp/ebf9aaah.t~#
DATETIME=`date +%Y%m%d_%H%M%S`
echo $DATAFILE > tmpnme.txt
sed 's_/_ _g' tmpnme.txt > tmpnme2.txt
DATA=$(cat tmpnme2.txt)... (2 Replies)
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Hi All,
I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers.
I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err
Regards,... (0 Replies)
Hi,
I am trying to clean up data between parenthesis () in a file.
See example below....
Input File :
(New York) Chicago (London)
New York (Chicago) London
New York Chicago (London)
(New York) (Chicago) (London)
New York (Chicago)
... (3 Replies)
I have a server running redhat 5.5 and it has one SAN device presented to it as LUN9. How can I clean up the remaining entries. I cannot afford to interupt the service. Please assist.
# multipath -l
mpath0 (36000097000019260298953666633436) dm-11 EMC,SYMMETRIX
\_ round-robin 0
\_ 2:0:0:9 ... (2 Replies)
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
How do i cleanup a log file data every 2 days, I was using below command in a script to remove log file every 2 days, but looks like its not working as log file date and time gets updated every 5 mins. Is there a way ?
find ./ \( -name . -o -prune \) -type f -mtime -2 -name... (9 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT CENTOS
systemd-tmpfiles-clean.timer
SYSTEMD-TMPFILES(8) systemd-tmpfiles SYSTEMD-TMPFILES(8)NAME
systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-
clean.timer - Creates, deletes and cleans up volatile and temporary files and directories
SYNOPSIS
systemd-tmpfiles [OPTIONS...] [CONFIGFILE...]
systemd-tmpfiles-setup.service
systemd-tmpfiles-setup-dev.service
systemd-tmpfiles-clean.service
systemd-tmpfiles-clean.timer
DESCRIPTION
systemd-tmpfiles creates, deletes, and cleans up volatile and temporary files and directories, based on the configuration file format and
location specified in tmpfiles.d(5).
If invoked with no arguments, it applies all directives from all configuration files. If one or more filenames are passed on the command
line, only the directives in these files are applied. If only the basename of a configuration file is specified, all configuration
directories as specified in tmpfiles.d(5) are searched for a matching file.
OPTIONS
The following options are understood:
--create
If this option is passed, all files and directories marked with f, F, w, d, D, p, L, c, b, m in the configuration files are created or
written to. Files and directories marked with z, Z, m have their ownership, access mode and security labels set.
--clean
If this option is passed, all files and directories with an age parameter configured will be cleaned up.
--remove
If this option is passed, all files and directories marked with r, R in the configuration files are removed.
--boot
Also execute lines with an exclamation mark.
--prefix=PATH
Only apply rules that apply to paths with the specified prefix. This option can be specified multiple times.
--exclude-prefix=PATH
Ignore rules that apply to paths with the specified prefix. This option can be specified multiple times.
--help
Prints a short help text and exits.
It is possible to combine --create, --clean, and --remove in one invocation. For example, during boot the following command line is
executed to ensure that all temporary and volatile directories are removed and created according to the configuration file:
systemd-tmpfiles --remove --create
EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise.
SEE ALSO systemd(1), tmpfiles.d(5)systemd 208SYSTEMD-TMPFILES(8)