05-14-2008
How to delete multiple space or tabs from a read only file
Hi,
Actually I am want to cut the three fields of "file-nr" file.
[yogender@gfmdatabase yogender]$ cat /proc/sys/fs/file-nr
638 219 52270
I want to assign these value to diffrent varibales as follow:-
a=638
b=219
c=52270
I tried to use cut command for this purpose and also tried to squeeze all sapces to a single space, but didn't succed.
I know file-nr is a read only file but there would be any way to cut these fields/values.
Kindly help me with this.
Thanks -
Yogender
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
when I try to run rm on multiple files I have problem to delete files with space.
I have this command :
find . -name "*.cmd" | xargs \rm -f
it doing the work fine but when it comes across files with spaces like : "my foo file.cmd"
it refuse to delete it
why? (1 Reply)
Discussion started by: umen
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have 2 processes that will be accessing the same file. First process first reads from the file, closes it and then opens it again to write to it (this is done sequentially). The second process may delete the file on some condition. These processes are independent of each other now.
What... (2 Replies)
Discussion started by: saumya.c
2 Replies
3. Shell Programming and Scripting
Hi I have a spaced filled file having records like below:
What I want is to read line having RT3 at position 17-19 then go to position 2651 check the 18 characters (might be space filled till 18 characters). This position should have a... (6 Replies)
Discussion started by: COD
6 Replies
4. Shell Programming and Scripting
Hi,
I want to delete the space from the file.
For eg :
deep | raj | sis
i want the output as
deep|raj|sis
Please Help me
Thanks,
Deep (2 Replies)
Discussion started by: deepakpv
2 Replies
5. Shell Programming and Scripting
here's the case :
almost of php/html file on my site has added the text :
<iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies
6. Shell Programming and Scripting
hi,
I have a file that is space separated at all columns. Basically what I want to do is replace all the space separations with column separations.
Thanks
kylle (1 Reply)
Discussion started by: kylle345
1 Replies
7. Shell Programming and Scripting
hello
I have browsed for the similar requirement i found this
https://www.unix.com/shell-programming-scripting/40163-xls-csv-conversion.html
but my problem is i have multiple tabs in xls file having same metadata
I want to convert it into single csv file
any ways to do it pls... (5 Replies)
Discussion started by: joshiamit
5 Replies
8. UNIX for Advanced & Expert Users
Hey Guys ,
Recently working on a requirement , i had to deal with XLS file with multiple tabs and the requirement was as below :
1. Convert one XLS file with multiple tabs to multiple CSV files.
-- As i was working on MAC , so it was quite easy through APPLESCRIPT to deal with this.But... (2 Replies)
Discussion started by: himanshu sood
2 Replies
9. Emergency UNIX and Linux Support
Hey Guys ,
Recently working on a requirement , i had to deal with XLS file with multiple tabs and the requirement was as below :
1. Convert one XLS file with multiple tabs to multiple CSV files.
-- As i was working on MAC , so it was quite easy through APPLESCRIPT to deal with this.But... (6 Replies)
Discussion started by: himanshu sood
6 Replies
10. UNIX for Beginners Questions & Answers
str contains tabs and multiple spaces
str="hello world. How are you?"
I want to check string start with hello world,
and my code is:
if ]world"* ]]; then
echo "found"
else
echo "not found"
fi
Not work
Other solution may work is to replace all tabs and... (4 Replies)
Discussion started by: cmdcmd
4 Replies