Sponsored Content
Full Discussion: Ssh newbie
Top Forums UNIX for Beginners Questions & Answers Ssh newbie Post 303046274 by RudiC on Wednesday 29th of April 2020 08:59:04 AM
Old 04-29-2020
I can't quite follow this request, nor do I understand its relation to the title "Ssh newbie", but if you have a file name stub in a variable that, in real filenames, is followed by two digits, which in turn you want incremented, try
Code:
$ HN=$(ls $stub[0-9][0-9] | tail -1)
$ printf -vFN "$stub%02d" $((${HN##*[^0-9]} + 1))

$FN now has the filename with the number incremented by one.

Last edited by RudiC; 04-30-2020 at 04:29 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

2. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

3. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

4. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

5. Shell Programming and Scripting

Using ssh to add register key on ssh server

Hi, I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double... (9 Replies)
Discussion started by: leaftree
9 Replies

6. Shell Programming and Scripting

Ssh = ssh expect and keep everything not change include parameter postion

I have write a script which contains ssh -p 12345 dcplatform@10.125.42.50 ssh 127.0.0.1 -p 5555 "$CMD" ssh root@$GUEST_IP "$CMD" before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position" I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. Shell Programming and Scripting

Check if file exists via ssh in ssh (nested)

I'm using redhat and have an odd issue with a nested ssh call. ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ] && ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key sftpin@10.0.0.1 ]" && ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
2 Replies

8. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

9. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies
nidl(1ncs)																nidl(1ncs)

Name
       nidl - Network Interface Definition Language Compiler

Syntax
       nidl filename [options]

Description
       The compiler is for the Network Interface Definition Language (NIDL).

       The filename argument is the pathname of an interface definition file, written in the C syntax of NIDL.

       The compiler generates a header file, a client stub file, a server stub file, and a client switch file, all in C source code.  The compiler
       derives the names of these output files from filename by replacing the suffix (the rightmost period and	all  subsequent  characters)  with
       extensions for the client stub, server stub, and client switch.

Options
       -confirm 	   Display the options chosen but do not compile anything.  In displaying information about -idir, the compiler constructs
			   the list of all directories it would use to resolve relative pathnames of imported files, not just the ones	explicitly
			   supplied.  (If the list is empty, the compiler uses only the current directory.)  This option is useful for viewing the
			   `idir list' and for viewing the default values for other options.

       -cpp pathname	   Run the specified program instead of the default C preprocessor.  You can use the -confirm option to view  the  default
			   pathname.

       -def def1 [def2 ...]
			   Pass  the  specified  definitions  to  the  C  preprocessor.  A definition can take either of two forms: symbol or sym-
			   bol=value.

       -exts cstub-ext,sstub-ext,cswtch-ext
			   Set the extensions that the compiler uses to name the stub and switch files it generates.  The text strings	cstub-ext,
			   sstub-ext, and cswtch-ext must be separated by commas, with no spaces; they are used as extensions for the client stub,
			   the server stub, and the client switch, respectively.  You can use the -confirm option to view the defaults.

       -f77c		   Generate client switch code that is compatible with the ULTRIX compiler.  The NIDL compiler appends an  underscore  (_)
			   character to the name of each client switch routine, so that the routines can be called from FORTRAN programs generated
			   by the compiler.

       -f77s		   Generate server stub code that is compatible with the ULTRIX compiler.  The NIDL compiler  appends  an  underscore  (_)
			   character  to the name of each manager routine that the stub calls, so that the stub can call routines generated by the
			   compiler.

       -idir directory1 [directory2 ...]
			   Use the specified directories as paths from which to resolve relative pathnames of imported files.  The compiler gener-
			   ates  an  ordered  list  of these directories.  By default, it prepends to this list your current working directory and
			   appends the system directory.  You can suppress this default by supplying the -no_def_idir option.

       -m		   Support multiple versions and multiple managers within a single server.  This option allows a  server  to  export  more
			   than  one version of an interface (`multiple versions') and to implement an interface for more than one type (`multiple
			   managers').

			   The compiler appends the version number to the interface name when it generates identifiers	in  the  stub  and  header
			   files.  For example, the interface specifier for version 3 of the foobar interface would be foobar_v3$if_spec.

			   The server for an interface compiled with -m must use to register its managers.  The server supplies the name of a man-
			   ager EPV to the manager code defines this EPV.  If the server supports objects of several types, it must use to  regis-
			   ter	each  object.  These registrations enable the RPC runtime library at the server host to dispatch incoming requests
			   to the correct manager.

			   If you do not specify either -m or its counterpart, -s, the compiler assumes -s and issues a  warning.   However,  this
			   default may be removed or changed in future NIDL compilers.	Even if your server exports only one version of its inter-
			   face and contains only one manager, use the -m option, so that it will be easy for you to incorporate multiple versions
			   and multiple managers later.

       -no_cpp		   Do  not run the C preprocessor on the input file.  If you specify this option, the NIDL compiler does not interpret any
			   C preprocessor statements (such as statements) in the interface definition.

       -no_def_idir	   Do not prepend the current working directory or append the system directory to the list of directories constructed from
			   -idir  arguments.   If  you	specify -no_def_idir without -idir, the compiler resolves pathnames of imported files only
			   relative to the current working directory.

       -no_stubs	   Do not generate any stub or switch files.  The NIDL compiler generates only header files and insert files.

       -no_warn 	   Suppress warning messages.

       -out directory	   Place the generated files in directory.  The default is the current working directory.

       -s		   Allow a server to export only a single version of an interface and to implement an interface for only  a  single  type.
			   This  option  requests the behavior of NIDL compilers before Version 1.5, which added support for multiple versions and
			   multiple interfaces.  (See the -m option.)
			   The server for an interface compiled with -s must use to register its interfaces.
			   If you do not specify either -s or its counterpart, -m, the compiler assumes -s and issues a  warning.   However,  this
			   default may be removed or changed in future NIDL compilers.	Even if your server exports only one version of its inter-
			   face and contains only one manager, use the -m option, so that it will be easy for you to incorporate multiple versions
			   and multiple managers later.

       -space_opt	   Reduce the size of generated stub code, possibly at the expense of slower data marshalling.

       -version 	   Display the version number of the NIDL compiler but do not compile anything or generate any output files.

See Also
       uuid_gen(3ncs)
       DECrpc Programming Guide

																	nidl(1ncs)
All times are GMT -4. The time now is 07:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy