09-28-2008
Hi again,
well I can see several scenarios...
for example if You start a process that unzips a large file... start it in background with &, then if You loop over a condition (until $fsize -eq $expectedfsize, or something) You could regularly check for filesize (with wc -c maybe) and present the progress as a fraction of how much is done.
And when it comes to a terminal/tty, moving the cursor to where You want it is not hackish! It's how You do it, at least thats the way I see it
The are tools/libs such as ncurses that are made for easy manipulation of text screens. One just has to decide how much one need it and which is the path of least resistance.
/Lakris
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
When I run a third parties program from the command line (this program basically list's a whole load of stuff) and write the output to a file it splits the output, i.e. in the middle of the file appears the exit command.
If I don't redirect the output and write it to tty then the output is... (3 Replies)
Discussion started by: dbrundrett
3 Replies
2. Shell Programming and Scripting
Hello,
Is is possible to redirect stdout to a file as well as to the console/screen or display in ksh.
any thoughts suggestions/input is appreciated. Thanks. (2 Replies)
Discussion started by: jerardfjay
2 Replies
3. UNIX for Dummies Questions & Answers
What am I doing wrong? I was searching for the answer to assigning variables from output. I found this simple response
ls -l apply_want.m | read perms links owner group size mtime1 mtime2 mtime3 file
this should allow me to echo the variables
echo "$perms | $links | $owner | $group |... (2 Replies)
Discussion started by: whamchaxed
2 Replies
4. Shell Programming and Scripting
Hi, trying to store a comand involving a redirection in a variable and then run this variable. But the redirection gets lost.
Ex:
#!ksh
MYCMD="ls -l > dirlist.txt"
$MYCMD
This runs the command but displays the result in the terminal instead of redirecting it to the text file.
Can... (4 Replies)
Discussion started by: rm-r
4 Replies
5. Shell Programming and Scripting
Hi All,
How do I provide the output of a command to another command which is waiting for an input from the user ?
Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Discussion started by: sushant172
1 Replies
6. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
7. Shell Programming and Scripting
Alright so i got this script genpipe:
echo "$*" |sh genscript file
vi file << 'HERE'
:%s/^/echo /g
:%s/ $//g
:%s/ /&\| xargs \.\/plus /g
:wq
HERE
cat file
Which generates output like echo 1 | xargs ./plus 2 | xargs ./plus 3 and so on
Now i got the next script multiplus, who should... (3 Replies)
Discussion started by: Bertieboy7
3 Replies
8. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
9. UNIX for Dummies Questions & Answers
Hello All,
I have the below script and output.
cat test.sh
#!/bin/bash -x
logit()
{
echo " - ${*}" > ${LOG_FILE}
}
LOG_FILE=/home/infrmtca/bin/findtest.log
VAR=`find . -type f -name "*sql"`
logit $VAR
Output:
cat /home/infrmtca/bin/findtest.log
-... (9 Replies)
Discussion started by: Ariean
9 Replies
10. Shell Programming and Scripting
Bit of a strange one.
Have a script called rapidclone_test.sh which calls Oracle rapidclone using su -c as an oracle osuser. However, if I control+c out to the calling shell anything entered is not displayed on the terminal. Any command executes successfully though.
Why is the standard... (1 Reply)
Discussion started by: u20sr
1 Replies
LEARN ABOUT LINUX
ncurses5-config
ncurses5-config(1) General Commands Manual ncurses5-config(1)
NAME
ncurses5-config - helper script for ncurses libraries
SYNOPSIS
ncurses5-config [options]
DESCRIPTION
This is a shell script which simplifies configuring applications against a particular set of ncurses libraries.
OPTIONS
--prefix
echos the package-prefix of ncurses
--exec-prefix
echos the executable-prefix of ncurses
--cflags
echos the C compiler flags needed to compile with ncurses
--libs echos the libraries needed to link with ncurses
--version
echos the release+patchdate version of ncurses
--abi-version
echos the ABI version of ncurses
--mouse-version
echos the mouse-interface version of ncurses
--bindir
echos the directory containing ncurses programs
--datadir
echos the directory containing ncurses data
--includedir
echos the directory containing ncurses header files
--libdir
echos the directory containing ncurses libraries
--mandir
echos the directory containing ncurses manpages
--terminfo
echos the $TERMINFO terminfo database path, e.g.,
/usr/share/terminfo
--terminfo-dirs
echos the $TERMINFO_DIRS directory list, e.g.,
/etc/terminfo:/lib/terminfo:/usr/share/terminfo
--termpath
echos the $TERMPATH termcap list, if support for termcap is configured.
--help prints this message
SEE ALSO
ncurses(3NCURSES)
This describes ncurses version 5.9 (patch 20110404).
ncurses5-config(1)