10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have to display only those subscribers which are in "unconnected state" and the date is 90 days older than today's date.
Below command is used for this purpose:
cat vfsubscriber_20170817.csv | sed -e 's/^"//' -e '1d' | \
nawk -F '",' '{if ( (substr($11,2,4) == 2017) && ( substr($11,2,8)... (1 Reply)
Discussion started by: dia
1 Replies
2. Shell Programming and Scripting
I want to create a conditional expression string and pass in an awk script. My script is as below...
comm="\$3 == "hello""
awk -F "^T" -v command="${comm}" ' {
if ( command ) { print "hye" }
}' testBut the statement "if ( command )" always evaluates to true which is not... (5 Replies)
Discussion started by: Saikat123
5 Replies
3. Shell Programming and Scripting
Hi Experts,
I am finding difficulty to get exact match:
file
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""
DHCP_ENABLE=0
INTERFACE_NAME="lan3:1"... (6 Replies)
Discussion started by: rveri
6 Replies
4. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
5. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
6. Shell Programming and Scripting
I have the following simplified code that I am planning on putting into a larger shell script. I have been butchering it to try and make work amongst google searches and reading awk documentation.
amixer sset Master toggle | awk '{ if ( /^ Front Left/ { print $7 } == // ) print "MUTED" }'I... (2 Replies)
Discussion started by: jelloir
2 Replies
7. Shell Programming and Scripting
Hi
I have a big file with a certain pattern (shown below) from which I need to parse out some digits in tabular format.
The format of the file is: '-' indicates text which doesn't to be parsed
# Output of huzzle for sequence file 1000.Clade1.html
- - - -- -------... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
8. Shell Programming and Scripting
Hello,
I have this:
#!/usr/bin/ksh
V1=ABC
str="hello 123;${V1}"
eval "echo $str"
i get
hello 123
/script.sh ABC not found
However eval works if $str variable doesn't contain a semicolumn (eg if str="hello 123~${v1}"
running the eval statement above would produce (2 Replies)
Discussion started by: endorphin
2 Replies
9. Shell Programming and Scripting
Hi,
I am trying to perform a simple soustraction between two floating numbers and cannot get it done for some reason due to the use of the sub command.
The following is the straight-forward result of the soustraction:
$ echo | gawk '{a=968;b=967.99;c=a-b;print c}' ... (2 Replies)
Discussion started by: Indalecio
2 Replies
10. Shell Programming and Scripting
Hi,
I need an awk command that would parse the below expression
Input Format
1 'Stmt1 ............................'2 'Stmt2 ............................'3 'Stmt3 ............................'4 'Stmt4 ............................'5 'Stmt5 ............................'6 'Stmt6... (1 Reply)
Discussion started by: rajan_san
1 Replies