10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I extracted a file using an awk command like this
awk '{print substr($0,78,5)"," substr($0,59,6) "," substr($0,81,3) "," substr($0,11,7)}' file1 >> OUTPUT
cat OUTPUT
00001,100000,005,0000080
00001,100000,008,0000220
00001,100000,001,0001000
00010,100000,001,0000400
I want... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
2. Shell Programming and Scripting
Judi # cat File1
judi /export/home 76
judi /usr 83
judi #
judi # cat File2
judi /export/home 79
judi /usr 82
judi #
if COLUMN3 of File2 is greater that COLUMN3 of File1, then print File2's lines
juid /export/home 79
Code tags please (2 Replies)
Discussion started by: judi
2 Replies
3. Shell Programming and Scripting
I have a file that reports the size of disks GB's or TB's - I need the file to report everything in MB's. Here is an extract of the file - the last column is the disk size.
19BC 2363 20G
1AA3 2363 2.93T
1A94 2363 750G
Whenever I come across a G I want to delete the G and multiply by... (2 Replies)
Discussion started by: kieranfoley
2 Replies
4. Shell Programming and Scripting
In advance, I appreciate any help or tips. I apologize for not providing examples of scripts I have already tried, the reason is that I am new to programming and do not really no where to start. I think this is possible with awk, but do not know how to go about learning how to write the script... (2 Replies)
Discussion started by: awc228
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All !
As a dummy, I try to search for multiple string of characters contained in 2 types of list.
Not clear? No it's not.
Example:
I have a tab-delimited file called "inventory" with 2 columns that looks like that:
#ref #year,color
xrt3 2000,blue
gf5 2000,red,green,yellow... (4 Replies)
Discussion started by: lucasvs
4 Replies
6. Shell Programming and Scripting
HI help
i have
cc 9+37.50 328611.50 688498.25 42.38
cc 66+62.50 328636.50 688498.42 42.58
i want to make o/p
cc 9+3750 328611.50 688498.25 42.38
cc 66+6250 328636.50 688498.42 42.58
plz help (2 Replies)
Discussion started by: Indra2011
2 Replies
7. Shell Programming and Scripting
Hi everyone,
Please help on this:
I have file1:
<file title="Title 1 and 2">
<report>
<title>Title 1</title>
<number>No. 1234</number>
<address>Address 1</address>
<date>October 07, 2009</date>
<description>Some text</description>
</report>
... (6 Replies)
Discussion started by: Ophiuchus
6 Replies
8. Shell Programming and Scripting
Hi All,
I have tried few things with this but it did not help much.
I have some 200,000 files in a directory. There are two sets of files.
1. Files with extension .dat with file names like these (1.dat, 2.dat, 5.dat, 8.dat....200000.dat)
2. Another set of files with .txt extension and... (5 Replies)
Discussion started by: shoaibjameel123
5 Replies
9. Shell Programming and Scripting
Here is my scenario, I have two columns. I need to add the first columns (the easy part). The second column is a percent that I need to subtract by 100 then multiply against the first column for each line, then sum the output for a total
Here is the input:
942330863 96
942172150 95... (4 Replies)
Discussion started by: mminaz
4 Replies
10. Programming
For kicks I wrote up a Password generator after lunch. Let me start with the code:
unsigned int x,y,z,c;
unsigned int KISS();
unsigned int devrand();
int main( int argc, char** argv )
{
int i, j = 1;
char pwd = "abcdefghijklmnopqrstuvwxyz"
... (5 Replies)
Discussion started by: VRoemer
5 Replies