06-07-2019
Welcome
suneet17,
I have a few to questions pose in response first:-
- Is this homework/assignment? There are specific forums for these.
- What have you tried so far? Please paste this in CODE tags.
- What output/errors do you get?
- What OS and version are you using?
- What are your preferred tools you are calling this in with? (C, shell, perl, awk, etc.)
- What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly,
What have you tried so far?
There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.
Is there a reason not to just use something like
ssh $user@$server df > $local_output_file?
We're all here to learn and getting the relevant information will help us all.
Thanks, in advance,
Robin
10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
10. 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
PASTE(1) User Commands PASTE(1)
NAME
paste - merge lines of files
SYNOPSIS
paste [OPTION]... [FILE]...
DESCRIPTION
Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output. With no FILE, or
when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-d, --delimiters=LIST
reuse characters from LIST instead of TABs
-s, --serial
paste one file at a time instead of in parallel
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by David M. Ihnat and David MacKenzie.
REPORTING BUGS
Report paste bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report paste translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for paste is maintained as a Texinfo manual. If the info and paste programs are properly installed at your site,
the command
info coreutils 'paste invocation'
should give you access to the complete manual.
GNU coreutils 8.12.197-032bb September 2011 PASTE(1)