10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Trying to use awk to format the input based on the filed count being 5. Most lines are fine using the awk below, except the first two lines. I know the reason is the -1 in green and -2 in blue. But can not figure out how to not split on the - if it is followed by a digit then letter. Thank you :).... (1 Reply)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
I am trying to modify and understand an awk written by @Scrutinizer
The below awk will filter a list of 30,000 lines in the tab-delimited file. What I am having trouble with is adding a condition to SVTYPE=CNV
that will only print that line if CI=,0.95: portion in blue in file is <1.9.
The... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
Hi All,
Seeking for your assistance to get the records once the $2 met the condition.
Ex. file 1.txt
123455,10-Aug-2020 07:33:37 AM,2335235,1323534,12343
123232,11-Aug-2015 08:33:37 PM,4234324,1321432,34364
Output:
123455,10-Aug-2020 07:33:37 AM,2335235,1323534,12343
What i did... (5 Replies)
Discussion started by: znesotomayor
5 Replies
4. Shell Programming and Scripting
Hi,
Can any one help me, in deleting the records from the database table based on the following condition:
script should take a configurable parameter as input. The input is nothing but “no. of years”.
For example, if I enter 2 as input parameter, then the 2 year old records should get... (2 Replies)
Discussion started by: zxcjggu708
2 Replies
5. Shell Programming and Scripting
hi ..all I have an urgency of doing some task so I am posting here...please help
i tried this ...its not working properly
awk '{if($1>p)print $0;else $1=$2="*";print $0}'pls find attachment
my input file is like this
0 25.2 11-Jan-1971 6.45 1040 SU
1 25.2 ... (3 Replies)
Discussion started by: Dona Clara
3 Replies
6. Shell Programming and Scripting
Hi Friends,
I have the following file,
cat input
chr1 1000 2000
chr1 600 699
chr1 701 1000
chr1 600 1710
chr2 900 1800
Now, I would like to see the difference of
Record1.Col2 - Record2.Col2
Record1.Col2 - Record2.Col3
Record1.Col3 - Record2.Col2
Record1.Col3 - Record2.Col3
... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
7. Shell Programming and Scripting
Hi Unix team,
I have a file with 30 columns with tab delimited. I need to count the records based on column 18 & 21 data.
So I cut the data from the file using
awk -F"\t" '{print $18,$21}' foo.txt
Following is the output:
USED SEDAN
USED SUV
NEW SUV
USED Truck
USED Truck
USED... (6 Replies)
Discussion started by: karumudi7
6 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have a input file say record.txt
hostname IP_address Port_No Version
A 10.10.10.1 80 6.02
B 10.10.10.2 81 6.03
C 10.10.10.3 82 6.04
row 1 has 4 field headings : hostname, IP_address, Port_No and Version.
and from 2nd row onwards the actual records start.
now i need to... (2 Replies)
Discussion started by: PranavEcstasy
2 Replies
9. Shell Programming and Scripting
Hi,
I have a text file with more than 100000 records.
I used the following command
awk '{if ($3<$2) print $1"\t"$3"\t"$2"\t"$4"\t"$5}' input.txt > output.txt
But, this one is printing which satisfies the condition, which are only 1000.
I would like to get all the 100000 records in... (4 Replies)
Discussion started by: jacobs.smith
4 Replies
10. Shell Programming and Scripting
Please help what is wrong in below script. It is printing else also,
else
echo "DATABASE NOT RUNNING :${i}
=================================================
#!/usr/bin/ksh
set -A DBS $(cat /etc/oratab | grep ":Y" | awk -F : '{print $1}')
set -A RDBS $(ps -ef | grep -i pmon | grep... (3 Replies)
Discussion started by: allwin
3 Replies