The solution works great! Out of curiosity, I wonder is there a way to accomplish the same thing with break/continue even though it is not as efficient?
Hi all experts,
here is a problem which i would appreciate ur expertise.
I need to do this:
Eg.
Find a number: 1234567 which i dunno which file and which folder
I do know which main folder it is in but it is hidden deep within a lot of subdir.
Is it possible to find the file? + output... (4 Replies)
Here is the file named tuwork..........
209 200 WZ 6529 SKTNCA01X4X C POI LODI LODI 738 SKTNCA0127T LOD
Here is the scipt.......
cat tuwork |
while
read rva
do
num=`echo $rva | cut -d" " -f1-2`
reg=`echo $rva | cut -c10`
ocn=`echo $rva | cut -c12-15`
x=`echo $rva | cut -c29`... (3 Replies)
I was just wondering how you would echo out different length variables but still have them all line up. I tried putting tabs between the variables but that didn't work as planned.
For example this is in some loop, with different variables in it each time:
echo "$1 $2 $3 $4 $5"
Appears like... (3 Replies)
hi:
I have some files like this
folder1/recording1.mp3
folder1/docs/budget.doc
folder2/others/misc.mp3
folder3/others/notes.doc
all this folders and files are under the mp3 folder.
I would like to move just the mp3s to another folder but retain the subdir structure i have.
So if... (4 Replies)
Hi,
I m trying to have script to grep a pattern in all files under a directory. I use Sun Solaris, the below want doesnt do exactly what I want.
find /home/xxx/ tagHeu | while read FILE; do
grep text $FILE && echo 1
grep text $FILE || echo 0
done
I also tried running:
find... (2 Replies)
I have created a directory structure and under the directory subdirectories and files are there.I need to move the entire thing
to another path.How can i write a script to do that.
currently the path of files is as below :
/data1/serial/mcycle/archive : under this path differnt sub dir exist ... (6 Replies)
Hey,
How can I copy files from subdirectories without copy the subdir
and copy it to a higher dir
For example:
/home/test/subdir/file1
copy file1 to /home or another dir
thanx (11 Replies)
Hi All,
I want to copy the dir/subdir structure from SERVER-A to SERVER-B without copying all the files in each dir.
Is it possible using SCP / SFTP command?
For example,
SERVER-A has following two dir/subdirectories and files under each subdir.
... (1 Reply)
I know, sounds mutually exclusive :-)
I have a script where I ask for a password and store it in a variable, and then use it with sudo on an array of other hosts. The password winds up being choed back to my terminal as well as to the process on the remote host, like:
Attempting to update... (2 Replies)
Hi,
When I run the the following code:
#!/bin/bash
if ]; then
usage
fi
if ]
then
echo "Do not execute this as root, use -s instead"
fi
SERVERFILE="servers"
function usage {
echo "USAGE: ${0} COMMAND" (4 Replies)
Discussion started by: mohca2020
4 Replies
LEARN ABOUT SUNOS
noecho
echo(3XCURSES) X/Open Curses Library Functions echo(3XCURSES)NAME
echo, noecho - enable/disable terminal echo
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
#include <curses.h>
int echo(void);
int noecho(void);
DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially,
curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft-
ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined.
RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5)SunOS 5.10 5 Jun 2002 echo(3XCURSES)