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
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
3. UNIX for Advanced & Expert Users
I must have forgot how to do this, but, I am attempting to enter a variable into an awk / gawk search pattern.
I am getting a value from user input to place in a specific section of a 132 character string.
my default command is ....
gawk --re-interval '/^(.{3}P .{4}CYA.{8}1)/' ... (3 Replies)
Discussion started by: sdeevers
3 Replies
4. Shell Programming and Scripting
$ cat data
Do NOT print me
START_MARKER
Print Me
END_MARKER
Do NOT print me
$ cat awk.sh
start=START_MARKER
end=END_MARKER
echo; echo Is this ugly syntax the only way?
awk '/'"$start"'/,/'"$end"'/ { print }' data
echo; echo Is there some modification of this that would work?
awk... (2 Replies)
Discussion started by: hanson44
2 Replies
5. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
6. Shell Programming and Scripting
if a variable has part of awk syntax stored in it. for eg: x=if($1>100)
can we substitute this variable in an awk statement.
based on above requirement can we execute something like:
awk '{x print $1}' infile (5 Replies)
Discussion started by: 47shailesh
5 Replies
7. Shell Programming and Scripting
I'm writing a bash script, and I am having trouble with this line:
awk '{print "url = \"http://www.example.com/directory/$type/"$1"\""}' input.file > output.file
Within the URL being printed, I wish the value of the variable "$type" to be printed, after being read from user input from the... (2 Replies)
Discussion started by: meridionaljet
2 Replies
8. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
9. Shell Programming and Scripting
Hi.
How to change string variable in awk?
for example, I parse with awk script text file named some_name_with_extension.txt
I want to print only some_name in my script
....
varCompName = FILENAME
print varCompName
How to put not all symbols from FILENAME to variable?
thank you
This... (4 Replies)
Discussion started by: cintlt
4 Replies
10. Shell Programming and Scripting
for example I have 123 and I will like it to be 321
thanks (2 Replies)
Discussion started by: umen
2 Replies