Sponsored Content
Operating Systems Solaris URGENT - setup port and dump all output to /dev/null or a file Post 302070468 by frustrated1 on Wednesday 5th of April 2006 07:36:26 AM
Old 04-05-2006
okay - I added the following to /etc/services
testlist 6661/tcp #test listen

and this to /etc/inetd.conf
testlist stream tcp nowait root /2.sh

In 2.sh I need to get this script to listen to all input and send it to a file or /dev/null


2.sh

bash-2.05# cat /2.sh
#!/usr/bin/ksh


INPUT='notblank'

while [ $INPUT != "xxxxxxxxxxxxxxxxxxxxx" ]
do
read INPUT
echo $INPUT >>/log.test
done

exit


This logs the input but if there is a blank space in the input then it cuts out with error :
bash-2.05# ./2.sh
sds
sdsds sds
./2.sh[6]: sds: unknown test operator
bash-2.05#


Any ideas?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating a file / /dev/null

First of all, hello there cOmMuNity ! :cool: Well, I've got two basic questions: 1) In how many ways it's possible to create a file ? I know one manner using "touch", other typing something like echo "" > file ... The fact is that I need to overwrite the file if it exists, and touch... (8 Replies)
Discussion started by: 435 Gavea
8 Replies

2. UNIX for Advanced & Expert Users

/dev/NULL can't open this file ??

when i write the following two statements : cp /dev/NULL /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp cat /dev/NULL > /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp its gives me errors like : cp: /dev/NULL: A file or directory in the path name does not exist. cat : /dev/NULL can't open... (2 Replies)
Discussion started by: varungupta
2 Replies

3. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

4. UNIX for Dummies Questions & Answers

cp output /dev/null results in not a directory

Hello, I am working on a script to measure the read performance of a busybox environment. The logical choice is to use a command line like: (time cp * /dev/null) 2> /tmp/howlong.txt Ah, the rub is cp or /dev/null will only accept a single file at a time. The result in the txt file is and... (1 Reply)
Discussion started by: stevesmo
1 Replies

5. Ubuntu

tar not reading if output directed to /dev/null

I stumbled across a somewhat strange behavior of tar and find no explanation for it: i was testing a DVD for read errors and thought to simply tar the content and direct the output to /dev/null: tar -cvf - /my/mountpoint/*ts > /dev/null This way i expected the system to read the complete... (4 Replies)
Discussion started by: bakunin
4 Replies

6. Shell Programming and Scripting

Error output of cat to /dev/null

Hello, I'm trying to send the error output of a 'cat' operation to /dev/null like this: cat /dirA/dirB/temp*.log > /dirA/dirB/final.log 2>/dev/null This works perfectly in a terminal, but not when placed in a script. If there are no files matching temp*.log the script outputs an error... (7 Replies)
Discussion started by: Nils88
7 Replies

7. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

8. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies

9. Shell Programming and Scripting

redirect the audio output to /dev/null

I'm using an text-to-speech synthesis in a script, and I need to redirect it's output to /dev/null how can I do that ? And how to redirect the stream to his normal output then (sound card ) ? thankx (2 Replies)
Discussion started by: firelink
2 Replies

10. AIX

/dev/null file issue

Hi Experts, I Have a query. In one of my server I just came to know that there was /dev/null file which is a not a character file. Its just a normal file. I know the command to create the character file (/dev/null) but what is the procedure. Like should i delete /dev/null and create or... (7 Replies)
Discussion started by: jayadeava
7 Replies
ib_rdma_lat(1)							   User Commands						    ib_rdma_lat(1)

NAME
ib_rdma_lat - RDM latency test SYNOPSIS
ib_rdma_lat [ options ] [ server IP address ] DESCRIPTION
This program tests the latency of RMDA write transactions. OPTIONS
-p, --port=<port> listen on/connect to port <port> (default: 18515) -d, --ib-dev=<dev> use IB device <dev> (default: first device found) -i, --ib-port=<port> use port <port> of IB device (default: 1) -s, --size=<size> size of message to exchange (default: 65536) -t, --tx-depth=<dep> size of tx queue (default 100) -n, --iters=<iters> number of exchanges (at least 2, default: 1000) -I, --inline_size=<size> max size of message to be sent in inline mode (default 400) -C, --report-cycles report times in cpu cycle units (default microseconds) -H, --report-histogram print out all results (default print summary only) -U, --report-unsorted (implies -H) print out unsorted results (default sorted) -c, --cma use the RDMA CMA to setup the RDMA connection -V, --version display version number AUTHOR
Guy Coates < gmpc@sanger.ac.uk > perftest February 20, 2008 ib_rdma_lat(1)
All times are GMT -4. The time now is 07:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy