07-01-2005
echo 'June 01' | sed 's/ 0/ /'
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm having a problem when the first line or first character of a file is blank. I need to get rid of both of them when they occur but don't want to delete the line. Does anyone have any suggestions? (7 Replies)
Discussion started by: anthreedhr
7 Replies
2. Shell Programming and Scripting
if $1 = "123x456", how can I test for the non-numeric character 'x' in that string. I've tried expr with "" but it did not find the x. Any ideas? Can this perhaps be done with sed?
Thanks. (2 Replies)
Discussion started by: lumix
2 Replies
3. Shell Programming and Scripting
how can i check whether variable contains only character from a-z or A-Z....if my variable contains any alpha numeric, numeric or any character with some special one i.e. *%&@! etcetera etcetera....then it should show me please enter only characters......
Let my variable
var1="abc77}|"
then... (9 Replies)
Discussion started by: manas_ranjan
9 Replies
4. AIX
i am a newbie to shell script,so i want a kshell script in which i need to check for a particular character inside a file through conditional looping(like if ,case,while)and if that character exists ,then substitute a given character to that character.
consider a file test.txt,inside the file... (1 Reply)
Discussion started by: karthikprasathk
1 Replies
5. Shell Programming and Scripting
Below is the abstract of the script which is working fine.
if ]
then
error_process "Invalid month format."
return 1
fi
I am doing validation for month and it errors if the value is > 12 or < 0. In addition, I want to add another condition to error if it... (2 Replies)
Discussion started by: sony_dada
2 Replies
6. Shell Programming and Scripting
hi,
I would like to calculate number of character for a number,
for exemple : 1200 --> there are 4 characters , 120001 -> 5 characters (4 Replies)
Discussion started by: francis_tom
4 Replies
7. Shell Programming and Scripting
Hi,
I have a variable and to it always alphanumeric value will be assigned.
If the value has any special characters in it then in the if statement it should exit like below
if (value has any speacial character)
then
exit
else
....
fi
can any one suggest how to acheive this? (4 Replies)
Discussion started by: lavnayas
4 Replies
8. UNIX for Dummies Questions & Answers
i have a veriable
set var1
set var2 = abcd
how can i check if var 1 is empty and if var 2 is not empty ??? (2 Replies)
Discussion started by: nirnir26
2 Replies
9. Shell Programming and Scripting
deleting (0 Replies)
Discussion started by: fretagi
0 Replies
10. Shell Programming and Scripting
I am working on a script to check the var on all of my systems. Can someone help me fix it to work better or give me suggestions.
#!/bin/ksh
IN=/path/to/list_of_workstations.txt
while read hostnames
do
if ping $hostnames 1 | grep alive > /dev/null
then
percent=`ssh -q... (3 Replies)
Discussion started by: whotippedmycow
3 Replies