10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
if the value > 100 delete the line
delay time: 42.978 ms
delay time: 43.684 ms
delay time: 41.082 ms
delay time: 44.845 ms
delay time: 40000.057 ms
delay time: 41.158 ms
delay time: 42.239 ms
delay time: 50.579 ms
delay time: 46.334 ms
to (7 Replies)
Discussion started by: yanglei_fage
7 Replies
2. UNIX for Advanced & Expert Users
Today I needed to take a look through a load of large backup files, so I wrote the following line to find them, order them by size, and print the file sizes in GB along with the filename. What happened was odd, the output was all as expected except for the first output line which had the filename... (4 Replies)
Discussion started by: gencon
4 Replies
3. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
4. Shell Programming and Scripting
Sample file:
This is line one,
this is another line,
this is the PRIMARY INDEX line
l ;
This is another line
The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Discussion started by: KC_Rules
5 Replies
5. Shell Programming and Scripting
I Have file1 with below lines :
#HostNameSelection=0 :NotUsed
#HostNameSelection=1 :Automatic
#HostNameSelection=3 :NotForced
I have file2 which has similar lines but with different values
I want to copy the changes from file1 to file2 ,line by line only if line begins with '#'.
for... (7 Replies)
Discussion started by: mvr
7 Replies
6. Shell Programming and Scripting
Hello. I'm trying to delete the lines of a file does not contain the letter "T " (for example) at position 26.
So far, I could only print the result:
awk '{if (substr ($ 1,1,26)! ~ / T /) print}' file.txt
How I can do to eliminate the lines that meet this condition?
Help please. ... (4 Replies)
Discussion started by: </kida>
4 Replies
7. Shell Programming and Scripting
hi guys,
I want to do pattern matching with awk or sed but I don't know how. here's what I want:
I have a line number for a pattern that I have already found using grep, and I know a pattern like "---" that happens a few lines above that certain line number. I want to print out the chunk... (1 Reply)
Discussion started by: alirezan
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies
9. Shell Programming and Scripting
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies
10. Shell Programming and Scripting
Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Discussion started by: homefp
8 Replies