10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a large list of names and would like to do a reverse sort on them i.e. the sort should be by the ending and not by the beginning of the word.
I had written in awk a small script but it does wrong things
{ for(i=length($0);i>=1;i--)
printf("%s/n",substr($0,i,1)); }
Could anyone... (3 Replies)
Discussion started by: gimley
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a String str="Manish". I would like to reverse it.
I know the option to do this in bash is: echo "Manish" | rev
but I have seen an alternate solution somewhere, which states that:
str="Manish" echo $str | awk '{ for(i=length($0);i>=1;i--) printf("%s",substr($0,i,1));... (7 Replies)
Discussion started by: manishdivs
7 Replies
3. Shell Programming and Scripting
hi,
I have to reverse the command output like below:
output:
online
offline
disable
maintening
killed
How to reverse this output like:
killed
maintening
disable
offline
online
It should be ksh script. (4 Replies)
Discussion started by: a2156z
4 Replies
4. Shell Programming and Scripting
i am using AIX -ksh
how can i reverse any file ,i have already try tac cmd it is not in AIX:
please help me out. (3 Replies)
Discussion started by: RahulJoshi
3 Replies
5. Shell Programming and Scripting
Hi I have used many times the various methods to append two lines together in a file.
This time I want to append the 1st line to the second and repeat for the complete file.... an example
This is the file
owns the big brown dog
joe
owns the small black dog
jim
What I want is
... (7 Replies)
Discussion started by: dwalley
7 Replies
6. Shell Programming and Scripting
i have created a script that will reverse any given ineter.
#!/bin/ksh
echo "Enter the number"
read n
if
then
a=`expr $n / 10`
b=`expr $n % 10`
c=`expr $b \* 10 + $a`
fi
echo $c
---------------------------------------------------------------------
the problem with this script... (4 Replies)
Discussion started by: ali560045
4 Replies
7. Shell Programming and Scripting
Hi,
My records are like this
BSC403_JAIN03|3153_TropicalFarm_LIMJM1-3_97|
BSC403_JAIN03|3410_PantaiAceh_PCEHM1_4_97|
BSC406_BMIN02|1433_JomHebohTV3_COW7M1_11_97|
I want to extract the value before _97|
This command
BSC_ID=`echo $DATA | cut -f5 -d"_"`
gives me
_97|, 4, 11
and by... (16 Replies)
Discussion started by: doer
16 Replies
8. Shell Programming and Scripting
Can we print any string in reverse order?
For example:
oracle 16294 1 0 Aug 11 ? 0:00 ora_reco_crepd
oracle 16276 1 0 Aug 11 ? 0:19 ora_dbw0_crepd
I need second last column from this output. (0:00 & 0:19).
I can use awk print $2 after reversing the string.
... (4 Replies)
Discussion started by: malaymaru
4 Replies
9. Shell Programming and Scripting
when I do
$ ls z*
List of all files begining with 'z'. But what if I want to do a reverse lookup. Just for interest sake ;)
$ ls ztr
should be same as
$ ls ztr*
$ ls zt*
$ ls z* (2 Replies)
Discussion started by: azmathshaikh
2 Replies
10. IP Networking
Help having problems accesing various sites that require me to be a registered .gov domain. My IP is a registered as an .gov but my nameserver record has changed on my DNS configurartion(I don't know why) from something.gov to somethingelse.gov. Same IP, though.
When a reverse lookup is... (1 Reply)
Discussion started by: jpalmer320
1 Replies