Dear friends,
please tell me how to pass the external variable values to the nawk command.
length=`expr $len2 - $len1`
i need to pass $length to following nawk command as mentioned below.
nawk '{if((x=index($0,"W/X"))>0){id=substr($0,x, $length);print x;print id;}}' filename1
but I am... (1 Reply)
I'm finding the following command very tedious to type in all the time, so I created a one line bash script called mount.bash with the following contents:
mount -t cifs //mark/C\$ -o unc=//mark\\C$,ip=10.1.1.33,user=Administrator,password=$1 /mnt/mark
I don't like the fact that I have to put... (5 Replies)
Hi one & All ,
My Need is to Create 64 Partition and create File System in Linux.
I have the Script ...
for((a=0;a<=63;a++))
do
fdisk /dev/cciss/c0d$a
done
for((a=0;a<=63;a++))
do
mkfs.ext2 /dec/cciss/'c0d'$a'p1'
done
the moment I run the Script I get the Prompt ...
Command... (1 Reply)
only the arguments that are written to the file,
my script is (sh /u01app/wkf.sh"$start_no","$name","$Condition","$file_name") like that
when ever I run my script I need to write into a new file every time,
like wise I have upto10 files with different names.bec my $start_no and $name will... (1 Reply)
I know that we can call system command to execute shell script in awk.
but it does not return the result of the command executed , but only returns
the value of the command executoin status ( 1/0 --> failure / success).
Could anyone let me know how to solve this problem. (9 Replies)
Hi All,
Can anybody please help me with how can i call my java program from shell and also pass parameter along with it so that the program can interpret the value/int and update the database.
Thanks in advance
Neha (1 Reply)
I use csh a lot but I don't really write csh scripts. Now I have a need to implement a security check (written in perl; verify an user input security code) into a csh script. Here is the senario:
#csh
1. call the perl script
2. if the perl script returns 'true', pass on;
if the perl... (1 Reply)
Hello, I have two bash scripts like the following:
script 1:
#!/bin/bash
var=WORLD
bash path/to/second/script/script2.bash
script 2:
#!/bin/bash
echo "HELLO $var"
I expected the output to be "HELLO WORLD" but instead, I get "HELLO". I understand that when I envoke another bash... (2 Replies)
Hello.
A find command return a list of file.
For each fileReplace the content starting with the first "§" (of two) ending with last "ɸ" (of two), regardless of the content ( five lines )
by the following content (exactly) :
§2019_08_23§ #
# ... (8 Replies)
Discussion started by: jcdole
8 Replies
LEARN ABOUT LINUX
net_adm
net_adm(3erl) Erlang Module Definition net_adm(3erl)NAME
net_adm - Various Erlang Net Administration Routines
DESCRIPTION
This module contains various network utility functions.
EXPORTS
dns_hostname(Host) -> {ok, Name} | {error, Host}
Types Host = atom() | string()
Name = string()
Returns the official name of Host , or {error, Host} if no such name is found. See also inet(3erl) .
host_file() -> Hosts | {error, Reason}
Types Hosts = [Host]
Host = atom()
Reason = term()
Reads the .hosts.erlang file, see the section Files below. Returns the hosts in this file as a list, or returns {error, Reason} if
the file could not be read. See file(3erl) for possible values of Reason .
localhost() -> Name
Types Name = string()
Returns the name of the local host. If Erlang was started with the -name command line flag, Name is the fully qualified name.
names() -> {ok, [{Name, Port}]} | {error, Reason}
names(Host) -> {ok, [{Name, Port}]} | {error, Reason}
Types Name = string()
Port = int()
Reason = address | term()
Similar to epmd -names , see epmd(1) . Host defaults to the local host. Returns the names and associated port numbers of the Erlang
nodes that epmd at the specified host has registered.
Returns {error, address} if epmd is not running. See inet(3erl) for other possible values of Reason .
(arne@dunn)1> net_adm:names().
{ok,[{"arne",40262}]}
ping(Node) -> pong | pang
Types Node = node()
Tries to set up a connection to Node . Returns pang if it fails, or pong if it is successful.
world() -> [node()]
world(Arg) -> [node()]
Types Arg = silent | verbose
This function calls names(Host) for all hosts which are specified in the Erlang host file .hosts.erlang , collects the replies and
then evaluates ping(Node) on all those nodes. Returns the list of all nodes that were, successfully pinged.
Arg defaults to silent . If Arg == verbose , the function writes information about which nodes it is pinging to stdout.
This function can be useful when a node is started, and the names of the other nodes in the network are not initially known.
Failure: {error, Reason} if host_file() returns {error, Reason} .
world_list(Hosts) -> [node()]
world_list(Hosts, Arg) -> [node()]
Types Hosts = [Host]
Host = atom()
Arg = silent | verbose
As world/0,1 , but the hosts are given as argument instead of being read from .hosts.erlang .
FILES
The .hosts.erlang file consists of a number of host names written as Erlang terms. It is looked for in the current work directory, the
user's home directory, and $OTP_ROOT (the root directory of Erlang/OTP), in that order.
The format of the .hosts.erlang file must be one host name per line. The host names must be within quotes as shown in the following exam-
ple:
^ (new line)
Ericsson AB kernel 2.14.3 net_adm(3erl)