10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here are a few lines from my script. The problem I am having is that the statement for gstat returns this error:
line 43:
The statement is coming from gstat.
Is there a way to fix it? Apparently -eq 02 is coming up as some octal value, I need it to be recognized as 02.
Apparently in... (4 Replies)
Discussion started by: newbie2010
4 Replies
2. Shell Programming and Scripting
Hello everyone,
I have a requirement as shown below. I need to delete consecutive same values from the source file and give it as output file.
Source:
a,b,c,d,e,e,f,g
Target:
a,b,c,d,f,g
The repeating value "e" should be deleted from the file completely. How can I achieve this... (14 Replies)
Discussion started by: vamsikrishna928
14 Replies
3. Shell Programming and Scripting
Hi I have a difficulty in writing shell script for performing the tasks.
A B C D
12 230 16 259
18 260 23 283
21 291 36 298
41 309 49 420
52 425 57 450
61 456 70 473
72 475 79 486
If the A(row no.2) < C(row no.1) then delete value A(row no.1) and so on...
For... (8 Replies)
Discussion started by: Sarwagya Jha
8 Replies
4. Shell Programming and Scripting
Hello,
I have a very large file for which I would like to remove all rows for which the value of columns 2-5 is zero.
For instance I would like this file:
contig1, 0, 0, 0, 0
contig2, 1, 3, 5, 0
contig3, 0, 0, 0, 0
contig4, 0, 5, 6, 7
To become this file:
contig2, 1, 3, 5,0 ... (17 Replies)
Discussion started by: mouchkam
17 Replies
5. Shell Programming and Scripting
Using korn shell. I am reading a file line by line. If a record has a carriage return (octal 015) then I append the second record to the first record. Not all records have a carriage return. I have the unix shell script working with grep, but when my file has +100,000 records it runs slow. I would... (3 Replies)
Discussion started by: sboxtops
3 Replies
6. Shell Programming and Scripting
key pair is 1st and 6th column ex:a20 : p10 or a20 : p11
For every key pair if the vlaue(4th column) is the same then delete all the lines who has keypair and the value
ex: a20 : p10 has value 1 only then delete those but a20 : p11 has different values 1,2 and 3 and keep those.
input
a20 ... (8 Replies)
Discussion started by: ruby_sgp
8 Replies
7. UNIX for Dummies Questions & Answers
Is there seriously not an easy way to do this? you really need a script for it? that is ridiculous! Please someone tell me there is an ls switch to view octal permissions instead of rwx i want 777. (1 Reply)
Discussion started by: glev2005
1 Replies
8. Shell Programming and Scripting
I have a file with 3 columns
2 4 5
2 4 7
3 5 7
4 -6 9
5 -9 4
6 -3 3
Bascially I want to delete the entire row if column 2 is a "-"
So the end result will be
2 4 5
2 4 7
3 5 7
I have trouble doing this cause of the - in front of the number.
thanks (2 Replies)
Discussion started by: kylle345
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Is there any way to display the permissions in octal format rather than "rwxrwxrwx" format.
I have a file and i want to see the permissions in octal format. Please help. (11 Replies)
Discussion started by: venkatesht
11 Replies
10. Programming
hi
i have a peculiar problem...i have a number of stirngs separated by a '/0'. it looks somethings like:
char test="abk\0jsdhj\01234\0"
actually i will be reading this from a file or something...
im supposed to change the \0 to a ','
but in C the octal representation starts with a '\'...... (1 Reply)
Discussion started by: strider
1 Replies