10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All ,
I am having an input file like this
Input file
r s
e y
Pin Numbers s n
eppppppppppppppppppc
... (3 Replies)
Discussion started by: kshitij
3 Replies
2. Shell Programming and Scripting
I am searching a file and not able to escape a space if $i has a space in the name. I tried escaping it with a \ and also trying to add it to allow for spaces in the search. Neither are correct as the first awk only outputs path and the second awk doesn't run. Thank you :).
first awk
awk... (3 Replies)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
Hi ,
Please suggest me how do I use : (colon and one space) as a delimiter in awk
Best regards,
Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies
4. UNIX for Advanced & Expert Users
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies
5. Shell Programming and Scripting
Hi Team,
Can you please tell me how to get a used space in KB LINUX and free space in KB separate commands.
For example:
$df -k
/rer (apdfp01.xxx.com:/var/adm/rash/MT) : 2066900 total allocated Kb
4579 free allocated Kb
16121 used allocated Kb
89 % allocation used
/dev/deviceFS1... (5 Replies)
Discussion started by: indira_s
5 Replies
6. Shell Programming and Scripting
I have an AWK script that uses multiple delimiters in the FS variable.
FS="+"
My awk script takes a file name such as this:
12345_smith_bubba_12345_20120215_4_0.pdf and parses it out based on the under score. Each parsed field then has some code for data validation etc.
This script has... (12 Replies)
Discussion started by: reno4me
12 Replies
7. UNIX for Dummies Questions & Answers
Hi experts,
why does
$ echo "one two three" | awk '{$3="my tree"; print $0}'
one two my tree
work,
but
$ var="my tree"
$ echo "one two three" | awk '{$3="'$var'"; print $0}'
awk: {$3="my
awk: ^ unterminated string
does not work?
How can the variable tha contains a space be... (2 Replies)
Discussion started by: GermanicGalore
2 Replies
8. Shell Programming and Scripting
I have a string and want to replace the / with a space.
For example having "SP/FS/RP" I want to get "SP FS RP"
However I am having problems using gsub
set phases = `echo $Aphases | awk '{gsub(///," ")}; {print}'` (5 Replies)
Discussion started by: kristinu
5 Replies
9. Shell Programming and Scripting
when printing using awk how can i print all the fields on 1 line?
#!/bin/sh
awk '{print $1 $2 $3}'
givesMeOutputLikeThis
whereas
awk '{print $1 " " $2 " " $3}'
gives
Me
Output
Like
This
I would like to line like this -> "gives Me Output Like This" (11 Replies)
Discussion started by: strike
11 Replies
10. Shell Programming and Scripting
If in my search string with awk, if I have spaces, I am getting an awk error.
e.g. awk /A B/ filename
How can I search the pattern which has space within? (1 Reply)
Discussion started by: videsh77
1 Replies