10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
2. UNIX for Dummies Questions & Answers
Ok I have a file that contains
#num.txt
1 2 3
4 5 6
7 8 9
my script main.sh checks to see if the first two arguments exist in a seperate file and the third argument would be the value in the num.txt
so when i execute
$ main.sh name place 5
how would i go about deleteing the... (13 Replies)
Discussion started by: austing5
13 Replies
3. Shell Programming and Scripting
I have a large data file that I need to edit. There are lines like,
> <IDNUMBER> (ST000002)
> <SUPPLIER> (ST000002)
> <IDNUMBER> (ST000004)
> <SUPPLIER> (ST000004)
and I need to delete everything after the >, excepting the end of line.
> <IDNUMBER>
> <SUPPLIER>
> <IDNUMBER>
> ... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
4. Shell Programming and Scripting
Hi, I'm totally new to awk, so thanks in advance for your help.
I want to make a csv file out of a text file I've exported from a database I want to do two things:
1. Change pipes ("|") to commas (",") to make a text file into CSV
2. Remove the second line of the file, which is useless junk. ... (3 Replies)
Discussion started by: pip56789
3 Replies
5. Shell Programming and Scripting
HI,
Im using the below commmand to delete lines having "(" at the start of a line.
sed -e '/^(/d'
But i need a command to delete lines that has only "(" in it and no other strings.
infile -
asdf
asdf
( asdf
(
asd
outfile (1 Reply)
Discussion started by: dvah
1 Replies
6. Shell Programming and Scripting
Hi all!
How can a file be rid of three lines in sequence like the sample below:
...
</s>
<s>
<w></w>
</s>
<s>
...to get:
...
</s>
<s>
...
Note that the digits between square brackets may be more than one, comprising a comma, or a full-stop; and that the string between brackets... (1 Reply)
Discussion started by: mjomba
1 Replies
7. Shell Programming and Scripting
Can any one help me how the sed delete only first line command (D) works.
sed -f sedcmds File.txt
In this how the sed delete only first line command (D) works to delete the blank lines appearing more than ones leaving only one blank and deleting others blanks.
While doing step by step when... (2 Replies)
Discussion started by: gwgreen1
2 Replies
8. Shell Programming and Scripting
Hi
I have a multi -line file which is sorted by the 1-st colomn in the following format:
400 0000 0001 1000 1010 0111 0000 1000 0000
402 1101 0000 1100 1010 0111 1000 1000 0000
403 1001 0000 1100 1010 0111 0000 1000 0000
495 1000 0000 1100 1010 0111 0000 1000 0000
500 0000 0001 1000 0010... (2 Replies)
Discussion started by: aoussenko
2 Replies
9. UNIX for Dummies Questions & Answers
How might I delete the contents of a file from the command line? (not delete the file) (4 Replies)
Discussion started by: juanbro
4 Replies
10. Shell Programming and Scripting
Hi all,
I'm newbi in scripting.
could someone tell how to delete the ^M at the end of the linie with an awk command.
many thanks in advance. (2 Replies)
Discussion started by: liliput
2 Replies