10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i have a file which have two columns, 2nd column have duplicate values and i want to delete and keep only distinct on basis on 2nd column.
-bash-4.1$ cat file_re
7440 713543695
7441 713543695
4603 714457614
4602 714457614
40301 717937765
40281 717937765
33741 721208982... (2 Replies)
Discussion started by: mirwasim
2 Replies
2. Shell Programming and Scripting
So I have a python program that I run, which runs accordingly to options I have listed in a text file (ie user_prefs). Now there are many options listed in this user_prefs.txt, but the one of most interest to me is that of the file path of the time series.
I have over a hundred of these time... (8 Replies)
Discussion started by: Jimmyd24
8 Replies
3. Shell Programming and Scripting
I need to change the content of the line after I grep it.
The line is :
Date SNWD.I-1 (in) WTEQ.I-1 (in) PREC.I-1 (in) TOBS.I-1 (degC) TMAX.D-1 (degC) TMIN.D-1 (degC) TAVG.D-1 (degC)
I want to change the second column (SNWD.I-1(in)) to SNWD.I-1(m), how could I do that?
I use csh... (2 Replies)
Discussion started by: handsonzhao
2 Replies
4. Shell Programming and Scripting
Hi,
I have a file like below
robert
PREF: 3
AVAIL:
henry
PREF: 234
AVAIL:
john
PREF: 145,178
AVAIL: 123
matt
PREF: 564,932
AVAIL:
ten
PREF: 389
AVAIL: kill (2 Replies)
Discussion started by: rocky1954
2 Replies
5. Shell Programming and Scripting
Hi
I have a file in the following format:
4135 f4135acc: 39798 rmtdb: 0 /t1/data/f4135acc.dta
4135 f4135pdb: 39795 rmtdb: 0 /bb/data/f4135pdb.dta
4135 p4135eng: 0 rmtdb: 0 /bb/bin/p4135eng
4135 r4135eng: 14142 rmtdb: 0 ... (6 Replies)
Discussion started by: aoussenko
6 Replies
6. Shell Programming and Scripting
Hi, I want to change on a file this line:
vif =
into:
vif =
But there are some conditionals:
1. last part '] of the original line after 00:16:3E:CE:23:14' ] may vary to 00:16:3E:CE:23:14' ] or 00:16:3E:CE:23:14 ' ]
2. The second mac adrress of the line I need,... (4 Replies)
Discussion started by: iga3725
4 Replies
7. Shell Programming and Scripting
I had posted previously about this problem I had.
I have multiple text files with hundreds of lines of the following type:
2000001 34 54 234 2000001
32 545 2000001 -2000001 77 2000001 44 2000001 998 2000001
77 32 2000001 45 23 111 89
98 75 23 34 999
.
.
.
etc...
What I wanted was... (2 Replies)
Discussion started by: xchen89x
2 Replies
8. AIX
I have seen references in the forum about getting yesterday's date but it is either by changing something in the system (date, time zone, ...) or with more then one line of script cmds.
How can I get yesterday's date without changing anything in the system and in one single command line ? (4 Replies)
Discussion started by: Browser_ice
4 Replies
9. Shell Programming and Scripting
Hi
It's possible to switch the line to colon from a file using Perl or AWK?
for example my file have somthing like this:
10 11 12 13 14
20 21 22 23 24
30 31 32 33 34
I want to have a file with the line switched like :
10 20 30
11 21 31
12 22 32
13 23 33
14 24 34
Thanks a lot (4 Replies)
Discussion started by: rauchy
4 Replies
10. Shell Programming and Scripting
Example:
O o x
What I would like to do is to rename the first column of the above file without affecting the format. The output should look like the following:
Output:
O o x
#! /bin/ksh
cd $HOME/lib/.Lee
#nl = no. of lines.
nl=`grep 'X' ex | wc -l`
#ln = line no.
ln=1 (17 Replies)
Discussion started by: ilak1008
17 Replies