10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm interested to match column pattern through awk using an external variable for data:
-9 1:751343:T:A -9 0 T A 0.726 -5.408837e-03 9.576603e-03 7.967536e-01 5.722312e-01
-9 1:751756:T:C -9 0 T C 0.727 -5.360458e-03 9.579447e-03 7.966977e-01 5.757858e-01... (7 Replies)
Discussion started by: genome
7 Replies
2. Shell Programming and Scripting
Hello,
I have text data that looks like this,
Mrv16a3102061815532D
6 6 0 0 0 0 999 V2000
-0.4018 1.9634 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.1163 1.5509 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.1163 0.7259 ... (9 Replies)
Discussion started by: LMHmedchem
9 Replies
3. Shell Programming and Scripting
I am trying to use awk to change a specific string in a field, if it is found, to another value. In the tab-delimited file the text in bold in $3 contains the string 23, which is always right before a ., if it is present.
I am trying to change that string to X, keeping the formatting and the... (3 Replies)
Discussion started by: cmccabe
3 Replies
4. Shell Programming and Scripting
Here is the structure of my file:
MyFile.txt
g-4.n.g.fr 10.147.243.63 g-4.n.g.fr-w1
Here is my sript:
test.sh
#! /bin/sh
ip=10.147.243.63
worker=$(grep -e $ip $1 | awk '{ print $3; }')
echo ""
echo $worker
echo ""
echo $worker
echo ""
echo "$worker.v.1"
echo... (7 Replies)
Discussion started by: chercheur111
7 Replies
5. UNIX for Dummies Questions & Answers
Hello All,
I have csv file, where one of fields is date (yyyy/mm/dd 00:00:00). Using awk I am trying to find all records with date newer/older than specific date. My idea was to compare unix timestamps of both dates:
start=`date +%s -d "$DateStart"`
awk -v start="$start" -v current=`date +%s... (34 Replies)
Discussion started by: haczyk
34 Replies
6. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
7. Shell Programming and Scripting
Hey Guys,
I have text such as this.
28003,ALCORN,2
28009,BENTON,2
28013,CALHOUN,2
28017,CHICKASAW,2
47017,CARROLL,2
05021,CLAY,0
The last digit after the final "," is a variable value. This is the base file. I have to do further execution on this file later and I need to update the... (7 Replies)
Discussion started by: chagan02
7 Replies
8. Shell Programming and Scripting
In awk script,
#!/bin/sh
awk 'BEGIN{i=0;}{i=i+5;}END{print i}' in.txt
vr=0;
vr=$i;
echo "$vr"
How can i assign that value of i in $vr(variable) of shell script? (7 Replies)
Discussion started by: cola
7 Replies
9. Shell Programming and Scripting
I haven't checked any installation script to see how this is done..
But I could not even do following simple task.
How do I Change existing variable value only when user enteres non-empty string. ?
#!/usr/bin/ksh
uid="scott"
# Assign new value user enters to uid, else leave it... (7 Replies)
Discussion started by: kchinnam
7 Replies
10. Shell Programming and Scripting
How could I change the lines with grep and awk to output a number instead of a string?
case '2':
@ L0 = 1
@ LN = `grep RS_D resample.in | awk '{print $3}'`
@ P0 = 1
@ PN = `grep RS_D resample.in | awk '{print $5}'`
# ||| fall through |||
Cheers (1 Reply)
Discussion started by: larne
1 Replies