10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a string:
2015-04-16 07:30:05,625000 +0900 xxxx.com
I just want to extract the time from the above line I am using the below syntax
x=~ /(.*) (\d+)\:(\d+)\:(\d+),(.*)\.com/
$time = $2 . ':' . $3 . ':' . $4;
print $time
But it is not working. Can some1 please help (2 Replies)
Discussion started by: karan8810
2 Replies
2. Shell Programming and Scripting
Hi,
I needed to extract some specific characters from a string based on user input. For example: After the script executes the user enters the following details:
Please enter the string: This is a shell script
Please enter the starting position: 11
Please enter the number of characters to be... (4 Replies)
Discussion started by: ChandanN
4 Replies
3. Shell Programming and Scripting
I have written an application in Tcl-Expect which spawns minicom and
sends and receives data via the serial port. Sometimes i see that the
application receives control characters along with human readable data.
A search on the internet tells me that the control characters are
nothing but the VT... (0 Replies)
Discussion started by: cityprince143
0 Replies
4. UNIX for Dummies Questions & Answers
I have the code
message={TP=2012:09:23:00:00:00:GMT,SD=2012:09:23:00:00:00:GMT,SP=2,FT=CCGT,FG=3605}
I want to extract the FG=3605 parts of this. Please help. I am trying to do this using awk or unix. (5 Replies)
Discussion started by: JenniferTopham
5 Replies
5. Shell Programming and Scripting
First, to level set: I'm proficient enough with basic BASH scripting for simple things (say, 4 out of 10), but this current project really requires a higher understanding of EXPECT than I have.
I have an interactive-only control application residing locally on a database server that I would... (2 Replies)
Discussion started by: toeharp
2 Replies
6. Shell Programming and Scripting
Hi All,
I have to write one expect script to login to one system.
I am using
set timeout -1
match_max 100000
spawn ssh root@hostname
Now when I do spawn ssh to that host it send some warning message and one challenge
Challenge: 111-2345
I need to read this challenge value and has... (1 Reply)
Discussion started by: Lokesh Agrawal
1 Replies
7. Shell Programming and Scripting
Hi,
I am trying to extract part of a line using "awk". My requirement is to extract the value $6 (which is the last parameter) from a line. As the sixth value contains some space, i am getting only part of the string. so i am trying to extract from $6 to the end of the buffer.
How to do it... (7 Replies)
Discussion started by: venkat_k
7 Replies
8. Shell Programming and Scripting
JADE TRADER 143W MYPEN 40 HC M X10 28 7 1 0
MYPEN 20 GP X X10 15 2 1 0
MYPEN 40 GP X X10 28 7 1 0
MYPEN 20... (6 Replies)
Discussion started by: finalight
6 Replies
9. Shell Programming and Scripting
Hi Group,
I am struggling to increase buffer size of expect,
sometimes after increasing the buffer size, expect captures all my expected output, sometimes not, :-(
I tried
match_max 700000
set expect_out(buffer) {}
Could anybody guide me for any solution.
HTH,... (1 Reply)
Discussion started by: jaduks
1 Replies
10. Shell Programming and Scripting
Hi,
I was wondering if there is an easy way to strip off the required basename. I have a script called apb0110021.sh and the contents of the script are
typeset -u MScript=`basename $0 | cut -d. -f1`
scriptname=sys.Audit.ksh
parms="PROJECT1 dsAudit $MScript 1 BEGIN"
$SCRIPTS/$scriptname... (3 Replies)
Discussion started by: madhunk
3 Replies