I am embarrassed to ask this but I am at the end of my rope.
I am trying to assign one (string) variable to another.
I do understand that bash variables are "not typed", but still learning usage of {} and spaces in script.
I have a program to create a directory if not present. Here is the program.
FYI: Directory name format: YYYY_MM_DD
#!/bin/bash
date=`date +%Y_%m_%d`
presence=$(ls -lrt /TS_File/ | grep "$date" | awk '{print $9}')
if
then
mkdir /TS_File/$date
else
echo "Unable to Create... (5 Replies)
In my script I'm retrieving a parameter through an API call. I need to trim some things out of the result so I can use it as a parameter to pass to another process. I've got it working but it's pretty kludgy and I'm hoping someone can help me with a better way.
This is the code that retrieves... (2 Replies)
Hi,
The following assigment is not working within shell script but is working from command line. Could anybody advise why? OS - solaris 8
APPL=`grep "$Application" ldapapps |awk '{print $1}'`
echo $APPL (5 Replies)
I'm going freakin crazy here! I've tried multiple attempts and configurationa and cannot get this to work.
I have a file:
private/etc/apt/sources.list.d/cydia.list
I want to replace a string in this file:
"deb http:name.of.address ./"
with
"deb http:name.of.other.address ./"
The... (4 Replies)
Hy friends, I am newbie to bash scripting, can anyone explain how b=${a/23/BB} # Substitute "BB" for "23". this line converts "b" into string and and "d" into Integer. Thanks in advance (4 Replies)
Hello All,
I'm trying to assign integer values to variables using substitution in both the value and variable's name, i.e.,
number$x=$x
where x is equal to one in the first assignment, two in the second assignment, and so on with x being incremented each time.
However, when I do the... (7 Replies)
If i'm given a string like "abc-def-1.2.3", how would I return "1"? I'm new to scripting and got stumped on this problem. Thanks in advance! (7 Replies)
Sorry for my english i am french
So i am receiving from a script this prompt :
tabular;critical;mirroring;DG INTlocaldg VOLUME appears
tabular;critical;mirroring;DG INTlocaldg VOLUME bh3vm
tabular;critical;mirroring;DG INTlocaldg VOLUME dev
tabular;critical;mirroring;DG INTlocaldg VOLUME... (3 Replies)
I figured this forum needs some laughs , so I am posting this.
And if the answer is - it depends on bash version - do not reply.
This is from "manual"
while CONTROL-COMMAND; do CONSEQUENT-COMMANDS; done
And here is the REAL code - no ";"
while do xterm & i=$ done (2 Replies)
Hi,
I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
LEARN ABOUT DEBIAN
net::cli::interact::transport::telnet
Net::CLI::Interact::Transport::Telnet(3pm) User Contributed Perl Documentation Net::CLI::Interact::Transport::Telnet(3pm)NAME
Net::CLI::Interact::Transport::Telnet - TELNET based CLI connection
VERSION
version 1.121640
DECRIPTION
This module provides a wrapped instance of a TELNET client for use by Net::CLI::Interact.
INTERFACE
app
On Windows platforms you must download the "plink.exe" program, and pass its location to the library in this parameter. On other platforms,
this defaults to "telnet".
runtime_options
Based on the "connect_options" hash provided to Net::CLI::Interact on construction, selects and formats parameters to provide to "app" on
the command line. Supported attributes:
host (required)
Host name or IP address of the host to which the TELNET application is to connect.
reap
Only used on Unix platforms, this installs a signal handler which attempts to reap the "ssh" child process. Pass a true value to enable
this feature only if you notice zombie processes are being left behind after use.
COMPOSITION
See the following for further interface details:
o Net::CLI::Interact::Transport
AUTHOR
Oliver Gorwits <oliver@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Oliver Gorwits.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-12 Net::CLI::Interact::Transport::Telnet(3pm)