10-06-2009
u can use sed..
just
echo "$infilename" | sed 's/ //g'
thanks
vasanth
10 More Discussions You Might Find Interesting
1. Linux
Hi all,
My disk space is 100% full.
df -k <dir> -> 100%
One of my debug files consume huge amount of space and i want to remove the same to start off fresh debugs.
However i'm unable to remove the file giving out the following error message:
rm -f debug.out22621
rm: cannot remove... (8 Replies)
Discussion started by: Pankajakshan
8 Replies
2. UNIX for Dummies Questions & Answers
I want to fetch text after the first occurance of the word "started at"
i.e. consider a text written below...
echo 'hi how r u '
Started at MON Jan 11 00:03:24 EST 2009
echo 'hi how is ur job goin on'
Started at Sun Jan 11 00:03:24 EST 2004
Started at TUE Jan 11 00:03:24 EST 2005
Started... (19 Replies)
Discussion started by: manit
19 Replies
3. Shell Programming and Scripting
i am a bit new to shell scripting
i have a file containing
xxxx xx xx
but i want to output the content as
xxxxxxxx.
thus removing the space.
any idea how i can do this (4 Replies)
Discussion started by: blackzinga
4 Replies
4. Shell Programming and Scripting
Hi all,
I have a file which have say about 123,000 records, the records in it look like:
1294160401681,05-01-2011 00:00:01,68,Cjw,2,3333,7,1100,900,SUCCESS,200,68,localhost,
1294160406515,05-01-2011 00:00:06,68,Cjw,2,0207,7,1100,900,SUCCESS,200,68,localhost,
1294160410097,05-01-2011... (3 Replies)
Discussion started by: danihamdani
3 Replies
5. Shell Programming and Scripting
i am using the default sed package that comes with solaris. (11 Replies)
Discussion started by: chidori
11 Replies
6. Shell Programming and Scripting
Hi ,
I want to remove space from each record in one file My file is like
BUD, BDL
ABC, DDD, ABC
ABC, DDD, DDD, KKK
The o/p should be
BUD,BDL
ABC,DDD,ABC
ABC,DDD,DDD,KKK
Can any one help me regarding this? (9 Replies)
Discussion started by: jagdishrout
9 Replies
7. Shell Programming and Scripting
Hi Gurus,
I have a file which contains some special char or space.
when using cat -evt I can see the file as following:
0,"0000","abc/def aaa ... (6 Replies)
Discussion started by: ken6503
6 Replies
8. Shell Programming and Scripting
Hi All ,
I am facing a small challenge i need unix command to remove space as well as replace "|" to "," in a csv file .
original file :
A | B | c | D
E | F | G | H
I | J | K | L
P | M | N | O
Expected o/p:
A,B,c,D
E,F,G,H
I,J,K,L
P,M,N,O (4 Replies)
Discussion started by: Sweety532
4 Replies
9. Shell Programming and Scripting
I have a folder that contains many sub folders and files. This tree has to be backed up to an archive system. According to the tech support, one of the archives is failing to back up due to the possibility of trailing spaces on file and folder names. Therefore, I would like to have a script... (16 Replies)
Discussion started by: vipertech
16 Replies
10. Shell Programming and Scripting
Hi,
I have a file which looks like this
FORD|1333-1| 10000100010203| 100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
I need the output to look like this
FORD|1333-1|10000100010203|100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
The leading... (8 Replies)
Discussion started by: wahi80
8 Replies
LEARN ABOUT CENTOS
restorecon
restorecon(8) restorecon(8)
NAME
restorecon - restore file(s) default SELinux security contexts.
SYNOPSIS
restorecon [-R] [-n] [-p] [-v] [-e directory] pathname...
restorecon -f infilename [-e directory] [-R] [-n] [-p] [-v] [-F]
DESCRIPTION
This manual page describes the restorecon program.
This program is primarily used to set the security context (extended attributes) on one or more files.
It can also be run at any other time to correct inconsistent labels, to add support for newly-installed policy or, by using the -n option,
to passively check whether the file contexts are all set as specified by the active policy (default behavior).
If a file object does not have a context, restorecon will write the default context to the file object's extended attributes. If a file
object has a context, restorecon will only modify the type portion of the security context. The -F option will force a replacement of the
entire context.
It is the same executable as setfiles but operates in a slightly different manner depending on it's argv[0].
OPTIONS
-e directory
exclude a directory (repeat the option to exclude more than one directory, Requires full path).
-f infilename
infilename contains a list of files to be processed. Use - for stdin.
-F Force reset of context to match file_context for customizable files, and the default file context, changing the user, role, range
portion as well as the type.
-h, -? display usage information and exit.
-i ignore files that do not exist.
-n don't change any file labels (passive check). To display the files whose labels would be changed, add -v.
-o outfilename
Deprecated, SELinux policy will probably block this access. Use shell redirection to save list of files with incorrect context in
filename.
-p show progress by printing * every 1024 files. (If you relabel the entire OS, this will show you the percentage complete.)
-R, -r change files and directories file labels recursively (descend directories).
Note: restorecon reports warnings on paths without default labels only if called non-recursively or in verbose mode.
-v show changes in file labels, if type or role are going to be changed.
-0 the separator for the input items is assumed to be the null character (instead of the white space). The quotes and the backslash
characters are also treated as normal characters that can form valid input. This option finally also disables the end of file
string, which is treated like any other argument. Useful when input items might contain white space, quote marks or backslashes.
The -print0 option of GNU find produces input suitable for this mode.
ARGUMENTS
pathname... The pathname for the file(s) to be relabeled.
NOTE
restorecon does not follow symbolic links and by default it does not operate recursively on directories.
AUTHOR
This man page was written by Dan Walsh <dwalsh@redhat.com>. Some of the content of this man page was taken from the setfiles man page
written by Russell Coker <russell@coker.com.au>. The program was written by Dan Walsh <dwalsh@redhat.com>.
SEE ALSO
setfiles(8), load_policy(8), checkpolicy(8)
2002031409 restorecon(8)