If I did indeed grep something out of it, why woudln't $result show nothing?
When I do $? , it does show success...
What is the proper syntax so that $result shows actual thing it's grepping out?
result=`(ssh $host tail -1 /something/somethingelse) | egrep -i "value" >dev/null`
#echo... (3 Replies)
im trying to run the below if command
ifconfig -a |grep 10.100.120.21
gives me below output
inet addr:10.100.120.21 Bcast:10.100.120.255 Mask:255.255.255.0
i just want a basic shell which says if above exists then continue
how would i do this? (6 Replies)
Hi All,
I am new to shell scripting.
I have a variable which holds a numeric value.I have to check whether this variable holds a value between(0- 8),(8-17)(17-24).How do i write this syntax using if in shell scripting.
Thanks
Vignesh (2 Replies)
I'm trying to approach a problem but all I'm coming up with are complex ways to manipulate the data. But still not getting the desired outcome.
directory of files....
file-100-foo
file-100-man
file-100-chu
Need to copy the files and increment the number in the file name
... (4 Replies)
Lets say I wanted to create a script that would show what people are doing on my machine using the w command and refresh in about 6 seconds. What would be the easiest way to do this? I pretty much want the script to loop until I stop it.
I'm using the BASH shell by the way.
Help is appreciated.... (1 Reply)
Im trying to make a script that simply adds a word to the last available line in a txt file without overwriting any previous lines.
Ive googled this and there are great examples but no one explain what each function does, and i dont entirely understand how it works.
Basically Im looking for... (7 Replies)
Hello all! I am very new to shell and Linux in general (I just started 2 days ago), I am trying to write a script that adds the size of the directories and files in a given directory and displays messages if the user puts in something wrong. I think I have covered all the possible problems except... (3 Replies)
Hi,
Sorry if this is a newbie question. I guess you can use either awk or shell script for this sequence of operations, but knowing very little about either of them I'm not sure how I should try to write this.
The basic objective is to copy certain files that are scattered all over my... (10 Replies)
Hello ,
I am new bee to Solr and trying to run sample example for solr .
java -Durl=http://locahost:8983/solr/update -jar post.jar books.csv
Error
SimplePostTool version 1.5
Posting files to base url http://locahost:8983/solr/update using content-type... (3 Replies)
Hi Folks -
I have a dumb question.
Why does this work:
pushd "/apps/scripts"
./script.sh
popd
But this doesn't:
./apps/scripts/script.shIs it that obvious where I'm overlooking it? (7 Replies)
Discussion started by: SIMMS7400
7 Replies
LEARN ABOUT PLAN9
ptmx
PTS(4) Linux Programmer's Manual PTS(4)NAME
ptmx, pts - pseudoterminal master and slave
DESCRIPTION
The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of root.root. It is
used to create a pseudoterminal master and slave pair.
When a process opens /dev/ptmx, it gets a file descriptor for a pseudoterminal master (PTM), and a pseudoterminal slave (PTS) device is
created in the /dev/pts directory. Each file descriptor obtained by opening /dev/ptmx is an independent PTM with its own associated PTS,
whose path can be found by passing the file descriptor to ptsname(3).
Before opening the pseudoterminal slave, you must pass the master's file descriptor to grantpt(3) and unlockpt(3).
Once both the pseudoterminal master and slave are open, the slave provides processes with an interface that is identical to that of a real
terminal.
Data written to the slave is presented on the master file descriptor as input. Data written to the master is presented to the slave as
input.
In practice, pseudoterminals are used for implementing terminal emulators such as xterm(1), in which data read from the pseudoterminal mas-
ter is interpreted by the application in the same way a real terminal would interpret the data, and for implementing remote-login programs
such as sshd(8), in which data read from the pseudoterminal master is sent across the network to a client program that is connected to a
terminal or terminal emulator.
Pseudoterminals can also be used to send input to programs that normally refuse to read input from pipes (such as su(1), and passwd(1)).
FILES
/dev/ptmx, /dev/pts/*
NOTES
The Linux support for the above (known as UNIX 98 pseudoterminal naming) is done using the devpts filesystem, that should be mounted on
/dev/pts.
Before this UNIX 98 scheme, master pseudoterminals were called /dev/ptyp0, ... and slave pseudoterminals /dev/ttyp0, ... and one needed
lots of preallocated device nodes.
SEE ALSO getpt(3), grantpt(3), ptsname(3), unlockpt(3), pty(7)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2016-03-15 PTS(4)