Hi!
Please help me find a command or a script to keep, for ex., 5 latest files and delete the rest in the directory. The order should be file creation date.
Your help is greatly appreciated.
Thank you.
You guys are great! it works fine except that backspaces appear as chars and the spacebar acts as backspace. Shouldn't it be the other way? Any ideas?
Also, I just made one minor correction - a closing double quote after "$mychar" = " ". Am I right?
Sorry for getting back to you late and thanks for the response.
The OS is SunOs and the shell is ksh.
BTW, read -n1 came out as a bad option error.
In a nutshell, the user should be able to see some characters while entering the password. The user is going to run a very long script in which...
Please someone help me find a way to solve password character issue.
I have 2 input statements for the user, one of which is a password to be entered. When the user inputs the password on the screen, I would like the characters to appear as asterisks or stars. I can use stty to make the...
Hi!
Can someone help me find a way to close all open files, there could be some exceptions though, by a shell script, before I start a certain process?
Thanks in advance...
Hi!
May be a dumb question but I could not find a right option.
I have a file with the following 2 lines.
abc|123|456
abcdef|235|567|
If I do a "grep" on the file for "abc", I am getting both "abc" and "abcdef", so is there a way I can get the line that contains "abc" only?
Please someone...
Hi! Folks!
Can someone help me with a code snippet to indicate processing, while my shell script is doing some work in the background?. The indicator's like continuous printing of forward slash, pipe, and backward slash or any thing else in the same character position.
Thank you very much in...
Hi!
I am looking to find a digit in a word.
For ex:
TEXT="Number3"
I need to find digit 3 (can be any digit 'n') in the variable $TEXT.
Can anyone please help?
Thanks.
Hi!
I want to automate a task that starts a server and exits once the server goes to running mode. The challenge is how to exit from the running mode. If you start the server interactively, through the command prompt, you can ^c from the process, but how do you achieve this by using a script...
I have a unix script that uses a lot of variables. I would like to search for all the variables(I can manually find for all the variables I used but it is time consuming) and unset them at the end of the script. Help me if you know any shortcut to search and print all variables that are declared...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.