Sponsored Content
Top Forums Shell Programming and Scripting Redirecting stdin/stdout to/from command from/to string Post 302403739 by doc_cypher on Sunday 14th of March 2010 10:17:10 AM
Old 03-14-2010
Thanks for the reply but I don't have that option.

Anyways, I found a way to redirect stdout to a string. Its at Get from stdout a string - GIDForums
This method uses pipes. Haven't tried it yet but seems it will work.

Any similar ideas for taking input from a string or some memory buffer instead of files??
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirecting to stdin

Hi, I'm having trouble with my script. I have to select different choices without any interaction from a menu that looks like : a - xxxxxxxxxxxxxx b - xxxxxxxxxxxxxx c - xxxxxxxxxxxxxx d - xxxxxxxxxxxxxx I tried things like : echo "a" >&0 read < echo "a" but none worked. Any... (4 Replies)
Discussion started by: flame_eagle
4 Replies

2. Programming

stdout/stdin + flushing buffers

Hi all I've run into a snag in a program of mine where part of what I entered in at the start of run-time, instead of the current value within printf() is being printed out. After failing with fflush() and setbuf(), I tried the following approach void BufferFlusher() { int in=0;... (9 Replies)
Discussion started by: JamesGoh
9 Replies

3. Shell Programming and Scripting

Redirecting stdin from fd 3-9?

Hi I'm trying to do something on the bash command line that I will later put into a bash shell script. I'm trying to take a program that reads stdin (using getline) and be able to keep it running in the background and fire "commands" to it. So what I thought I should do was to try taking... (3 Replies)
Discussion started by: niceguyeddie
3 Replies

4. UNIX for Dummies Questions & Answers

Redirect stdin stdout to multiple files

Hi, i know how to a) redirect stdout and stderr to one file, b) and write to two files concurrently with same output using tee command Now, i want to do both the above together. I have a script and it should write both stdout and stderr in one file and also write the same content to... (8 Replies)
Discussion started by: ysrini
8 Replies

5. Shell Programming and Scripting

can't close stdin/stdout in shell

#!/bin/sh exec 0</dev/null exec 1>/dev/null ls -l /proc/self/fd >&2 produces total 0 lr-x------ 1 tyler users 64 Feb 18 10:38 0 -> /proc/7886/fd lrwx------ 1 tyler users 64 Feb 18 10:38 1 -> /dev/pts/4 lrwx------ 1 tyler users 64 Feb 18 10:38 2 -> /dev/pts/4 I've verified the shell is... (10 Replies)
Discussion started by: Corona688
10 Replies

6. Shell Programming and Scripting

redirecting to stdout in betwen command

can anyone help me in making singleline command for Capital Letters are folders ,small letter are files X,Y,Z are subfolders of A as shown below A - X,Y,Z Folder X has three files a.txt,b.txt,c.txt similarly Y,Z. as shown below X- a.txt,b.txt,c.txt Y- a.txt,b.txt,c.txt Z-... (4 Replies)
Discussion started by: phoenix_nebula
4 Replies

7. Programming

read and write stdin/stdout in unix

Hi, i am using the below program to read from the standard input or to write to standard out put. i know that using highlevel functions this can be done better than what i have done here. i just want to know is there any other method by which i find the exact number of characters ( this... (3 Replies)
Discussion started by: MrUser
3 Replies

8. UNIX for Dummies Questions & Answers

STDIN and STDOUT

Hallo, i have a script like: if ;then echo "OK" else echo "ERROR $2 is missing" fi; if ;then touch $2 fi; if ;then cat $1 | grep xy > $2 (1 Reply)
Discussion started by: eightball
1 Replies

9. Shell Programming and Scripting

Redirecting stdion, stdout within an AT command

Hello, I'm strugling with some redirecting and all help is apreciated. The following program is working as expected, but the result of the AT command doesn't go to any file. Thanks in advance for the help. #!/bin/bash modem=/dev/ttyUSB1 file=/root/imsi.txt # print error to stderr and exit... (4 Replies)
Discussion started by: cleitao
4 Replies

10. Shell Programming and Scripting

[stdin / stdout] Strategies for redirecting outputs

Well.. let's say i need to write a pretty simple script. In my script i have 2 variables which can have value of 0 or 1. $VERBOSE $LOG I need to implement these cases: ($VERBOSE = 0 && $LOG = 0) => ONLY ERROR output (STDERR to console && STDOUT to /dev/null) ($VERBOSE = 1... (5 Replies)
Discussion started by: Marmz
5 Replies
W3M(1)							      General Commands Manual							    W3M(1)

NAME
w3m - a text based Web browser and pager SYNOPSIS
w3m [options] [URL or filename] DESCRIPTION
w3m is a World Wide Web (WWW) text based client. It has English and Japanese help files and an option menu and can be configured to use either language. It will display hypertext markup language (HTML) documents containing links to files residing on the local system, as well as files residing on remote systems. It can display HTML tables and frames. In addition, it can be used as a "pager" in much the same man- ner as "more" or "less". Current versions of w3m run on Unix (Solaris, SunOS, HP-UX, Linux, FreeBSD, and EWS4800) and on Microsoft Windows 9x/NT. OPTIONS
At start up, w3m will load any local file or remote URL specified at the command line. For help with runtime options, press "H" while run- ning w3m. Command line options are: -t tab set tab width -r ignore backspace effect -l line # of preserved line (default 10000) -I charset document charset -O charset display/output charset -B load bookmark -bookmark file specify bookmark file -T type specify content-type -m internet message mode -v visual startup mode -M monochrome display -N open URL of command line on each new tab -F automatically render frame -dump dump formatted page into stdout -cols width specify column width (used with -dump) -ppc count specify the number of pixels per character (4.0...32.0). Larger values will make tables narrower. [default 8.0] -ppl count specify the number of pixels per line (4.0...64.0) -dump_source dump page source into stdout -dump_head dump response of HEAD request into stdout -dump_both dump HEAD and source into stdout -dump_extra dump HEAD, source, and extra information into stdout -post file use POST method with file content -header string insert string as a header +<num> goto <num> line -num show line number -no-proxy don't use proxy -4 IPv4 only (-o dns_order=4) -6 IPv6 only (-o dns_order=6) -no-mouse don't use mouse -cookie use cookie. -no-cookie don't use cookie -graph use graphic character -no-graph don't use graphic character -S squeeze multiple blank lines -W toggle wrap search mode -X don't use termcap init/deinit -title [=TERM] set buffer name to terminal title string. If TERM is specified, use the TERM style title configuration. -o opt=value assign value to config option -show-option show all available config option -config file specify config file -help show usage -version show w3m version -reqlog write request logfile -debug DO NOT USE EXAMPLES
To use w3m as a pager: $ ls | w3m To use w3m to translate HTML files: $ cat foo.html | w3m -T text/html or $ cat foo.html | w3m -dump -T text/html >foo.txt FILES
${HOME}/.w3m/config configuration file ${HOME}/.w3m/keymap key binding configuration file ${HOME}/.w3m/mouse mouse configuration file ${HOME}/.w3m/cookie cookie file ${HOME}/.w3m/history history file ${HOME}/.w3m/passwd passowrd and username file ${HOME}/.w3m/pre_form form parameters file ${HOME}/.w3m/mailcap external viewer configuration file ${HOME}/.w3m/mime.types MIME types file NOTES
This is the w3m 0.5.3 Release. Please see the MANUAL.html file distributed with w3m for more detailed documentation. Additional information about w3m may be found on its Japanese language Web site located at: http://w3m.sourceforge.net/index.ja.html or on its English version of the site at: http://w3m.sourceforge.net/index.en.html ACKNOWLEDGMENTS
w3m has incorporated code from several sources. Users have contributed patches and suggestions over time. AUTHOR
Akinori ITO <aito@fw.ipsj.or.jp> 4th Berkeley Distribution Local W3M(1)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy