Sponsored Content
Full Discussion: tr command with uname -n
Top Forums UNIX for Advanced & Expert Users tr command with uname -n Post 302427285 by Pierluigi.sala on Friday 4th of June 2010 01:01:57 PM
Old 06-04-2010
The result I'd like to obtain is the following :
depending on the system name 'uname -n' a variable content should be replaced
with another string,example :
for mil22h system mil with moc flr with foc vrn with moc
for mil21h system mil with mac flr with fac vrn with vac
tks in advance

---------- Post updated at 07:01 PM ---------- Previous update was at 06:33 PM ----------

Let's say that I'd like to change a content of variable defined on change_from with the content defined on change_to,example mil with moc ,flr with foc :
change_from="mil:flr:vrn"
change_to="moc:foc:voc"
how can i do this ?
 

9 More Discussions You Might Find Interesting

1. AIX

uname -S

hi , i have made a mistake :( on the production enviourment by change tha host name . after that i returned back the old name. but i think this will not afeect the system until reboot the machine. laso i tried to telnet the syetem by the host name not by the IP address and it works fine. ... (2 Replies)
Discussion started by: habuzahra
2 Replies

2. Linux

Uname

what is the difference between uname -m and uname -i what it actually means (2 Replies)
Discussion started by: Dileepsp
2 Replies

3. Shell Programming and Scripting

ssh and remote command exec `uname -r`

Hi guys, I am trying to do a ssh for performing a set of actions. Find it below: I need to put the user/ kernel/ DISTRO variables before I complete this operation. what I observed is when ever I put a `command` in those quotes, it performs thta action in local system rather than remote one.... (5 Replies)
Discussion started by: jbmukund
5 Replies

4. UNIX for Advanced & Expert Users

uname info

Hi all, on my linux i typed uname -a which gave me Linux dell.domain.net 2.6.13-1.1526_FC4smp #1 SMP Wed Sep 28 19:30:04 EDT 2005 i686 i686 i386 GNU/Linux I was checking kernel version i also didnt know what linux i have... So if i undersood this correctly , i have fedora core 4 ? Also ,... (3 Replies)
Discussion started by: ttoni
3 Replies

5. Solaris

small doubt reg uname command

Am new to solaris can anyone explain the fields in the below command. Also let me know the difference between nodename and hostname. Here osnask2 is the hostname and type SUNOS. What abt the remaining fields.? #uname -a SunOS osnska2 5.8 Generic_117350-47 sun4u sparc SUNW,Sun-Fire-480R (1 Reply)
Discussion started by: rogerben
1 Replies

6. UNIX for Advanced & Expert Users

RedHat, Solaris - what is uname command ??

Hi ! All I'm big fan of Unix/Linux . I want understand the basics of linux/unix version and How they are related to Vendor ... releases. uname -a will give the OS details. But can somebody provide me a pointer , to understand the very BASICS of these terminology like Million Thanks.!!! (2 Replies)
Discussion started by: dashok.83
2 Replies

7. Solaris

uname help

hi all, Operating System Name : Unix Sun Solaris Operating system release level : 5.10 Operating system version : Generic_137111-06 i know the release level that is kernel version Generic_137111-06 what is number... (6 Replies)
Discussion started by: coxmanchester
6 Replies

8. UNIX for Dummies Questions & Answers

Uname command

Hi, Can anyone let me know the -n option in uname command in unix? Gone through the man pages of uname, but unable to interpret. Thanks in advance. (1 Reply)
Discussion started by: venkatesht
1 Replies

9. Solaris

uname -a

bssmsrv223:/ 53 ] uname -a SunOS bssmsrv223 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V245 bssmsrv223:/ 54 ] what does 118833-36 denotes in Generic_118833-36 (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies
uname(2)							System Calls Manual							  uname(2)

NAME
uname - Gets the name of the current system SYNOPSIS
#include <sys/utsname.h> int uname( struct utsname *name); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: uname(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a utsname structure. DESCRIPTION
The uname() function stores information identifying the current system in the structure pointed to by the name parameter. The uname() function uses the utsname structure, which is defined in the sys/utsname.h file and contains the following members: char sys- name[_SYS_NMLN]; char nodename[_SYS_NMLN]; char release[_SYS_NMLN]; char version[_SYS_NMLN]; char machine[_SYS_NMLN]; The uname() function returns a null-terminated character string naming the current system in the sysname character array. The nodename array contains the name that the system is known by on a communications network. The release and version arrays further identify the sys- tem. The machine array identifies the CPU hardware being used. RETURN VALUES
Upon successful completion, a nonnegative value is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
If the uname() function fails, errno may be set to the following value: [Tru64 UNIX] The name parameter points outside of the process address space. RELATED INFORMATION
Commands: uname(1) Standards: standards(5) delim off uname(2)
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy