10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which contains the data lines like below.I want to remove the tab spaces at the end of each line.I have tried with the command sed 's/\+$//' file.but it does not work.Can anyone help me on this?
15022 15022 15022 15022 15022 15022
15023 15023 15023 15023 15023 ... (16 Replies)
Discussion started by: am24
16 Replies
2. Shell Programming and Scripting
Dear team,
I have a file curve.csv which is generated from oracle and each line has a comment associated with it, I want to get rid of this comment, can you please suggest me a command as how to do it
Eg,
cat curve.csv
/*data for today curve*/
/*data for text1*/ this is the header
/*data... (6 Replies)
Discussion started by: infyanurag
6 Replies
3. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
4. Shell Programming and Scripting
I have one output file.
Node: hstg1so Date: 2013/07/16 17:51:24 GMT
Totals: 10608 6871 0 2208 1529 0 0 64% 0% ( 0 )
Node: hstg2so Date: 2013/07/16 17:51:25 GMT
Totals: ... (3 Replies)
Discussion started by: Raza Ali
3 Replies
5. Shell Programming and Scripting
Hi
I have written a shell script which used sed code below
sed -i 's/'"$Pattern"'/ /g' $FileName
I want to count the length of Pattern and replace it with equal number of spaces in the FileName.
I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies
6. Shell Programming and Scripting
I am on ubuntu 11.10 using bash scripts
I want to remove all files matching a string pattern and I am using the following code
find . -name "*$pattern*" -exec rm -f {} \;I have encountered a problem when $pattern is empty. In this case all my files in my current directory were deleted. This... (3 Replies)
Discussion started by: kristinu
3 Replies
7. Shell Programming and Scripting
I am trying to delete a pattern without removing line. I searched a lot in this forum and using those I could come up with sed command but it seems that command does not work. Here's how my file looks like:
1 ./63990 7
1171 ./63990 2
2425 ./63990 9
2539 ./63990 1
3125 ./63990 1
10141... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
8. Shell Programming and Scripting
I have the following:
HH:MM:SS
I want to use either % or # sign to remove :SS can somebody please provide me an example. I know how to do this in awk, but awk is too much
overhead for something this simple since I will be doing this in a loop a lot of times.
Thanks in advance to all... (2 Replies)
Discussion started by: BeefStu
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a line like this
" field1;field2;field3 " (single space after and before double quotes).
Now i have to remove these single space . Kindly help me.
Thanks in advance (2 Replies)
Discussion started by: krishna_gnv
2 Replies
10. Shell Programming and Scripting
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas
4 Replies