Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: LiorAmitai
17,746
Posted By hergp
Since the OP asked, how to do it in ksh - here...
Since the OP asked, how to do it in ksh - here is, how to do it using the printf command or builtin (in ksh93):


printf "bla bla\r"


BTW: I really try to avoid using echo, because there are...
17,746
Posted By balajesuri
In GNU Bash: man echo . . -e ...
In GNU Bash:

man echo
.
.
-e enable interpretation of backslash escapes
.
.
\r carriage return
17,375
Posted By Scrutinizer
OK, try this: answer=x while : ; do echo...
OK, try this:
answer=x
while : ; do
echo "waiting for user to hit ENTER"
sleep 3
done &
pid=$!
until [ -z "$answer" ]; do
read answer
done
kill $pid
Forum: AIX 08-14-2011
2,241
Posted By zxmaus
anything up to 1:4 that is not constant is ok. If...
anything up to 1:4 that is not constant is ok. If you scan constantly you most likely need more memory

Regards
zxmaus
2,131
Posted By pravin27
echo "scale=2; 4 / 3" | bc
echo "scale=2; 4 / 3" | bc
29,013
Posted By Franklin52
Another one: echo 123x567 | awk -Fx '{print...
Another one:
echo 123x567 | awk -Fx '{print length($1)+1}'
29,013
Posted By michaelrozar17
Or try.. echo ${string%X*} | wc -cOne more.. ...
Or try..
echo ${string%X*} | wc -cOne more..
echo "$string" | awk '{sub(/X.*/,"");print length($0)+1}'
1,518
Posted By bakunin
The short (and probably unsatisfying) answer is:...
The short (and probably unsatisfying) answer is: you can't - at least you can't using a standard ftp client. There might be more powerful ftp-clients out there, but using them will make your solution...
1,518
Posted By zaxxon
Check if your ftp client has a switch for being...
Check if your ftp client has a switch for being less talkative maybe. Else I guess you'll have to rewrite the ftp client ;) In an output (log) file you could just do a

grep -v "Local directory...
2,549
Posted By ctsgnb
do you have an account on server2 ? is it macc or...
do you have an account on server2 ? is it macc or macc1 ?
maybe your home directory it different from one server to another
can you just

rsh server2
pwd
id

(this will defaultly log in...
1,023
Posted By LivinFree
It depends on your shell. Which shell are you...
It depends on your shell. Which shell are you using?

Assuming from the syntax that it's sh, bash, ksh, or similar, check for a .profile, .bashrc, or .bash_profile in your home directory -...
3,219
Posted By Chubler_XL
You could do this with an expect script that took...
You could do this with an expect script that took user and host as parameters, prompts for password without echo and then invokes rlogin and tries the password.
If it fails then terminate, otherwise...
2,006
Posted By cgkmal
Hi LiorAmitai, Short version, without use of...
Hi LiorAmitai,

Short version, without use of substr():
echo "ABC=ahaakl/123456/ksksk" | awk -F"/" '{print $2}'
123456Very long version using substr(), index() and length():
echo...
1,574
Posted By Corona688
Do you mean ssh? Embedding passwords in...
Do you mean ssh?

Embedding passwords in shell commands is a bad idea, it's very insecure. For this reason ssh -- and nearly any other login system like su and sudo -- make it extremely difficult...
1,460
Posted By Scott
As you seem to be having fun with pipes, what...
As you seem to be having fun with pipes, what harm would another one do?


tmp_tail=$(tail -2 ...... | head -1)


Some sed (which I'm sure could be simplified):

$ sed -n...
6,563
Posted By Scrutinizer
In ksh93 that would work too, but not in ksh88....
In ksh93 that would work too, but not in ksh88. You can use this:
TMP=12345; TMP2=${TMP%${TMP#??}}
MID=${TMP2#?}
Showing results 1 to 16 of 16

 

Featured Tech Videos

All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy