09-08-2014
Quote:
Originally Posted by
tostay2003
I am trying to obtain a substring in AIX
What you tried is ksh93 only, as Don Cragun already said. The default shell (
/usr/bin/ksh and
/usr/bin/sh, which is a link to the former) in AIX is a ksh88. A ksh93 (revision t in AIX 7.1, TL3) is only available as
/usr/bin/ksh93.
To sum it up, Don was spot on with his suspicion.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to get various portions of strings in my script, but am getting a substitution error. I followed the syntax that was described when I goggled this, but I can't get anything to work.
#! /bin/ksh/
hello="adklafk;afak"
#hello=${hello:3}
hello=${$hello:3}
happy="hey"
echo... (1 Reply)
Discussion started by: anderssl
1 Replies
2. AIX
i am trying to convert .ksh script to .bat in windows box , it says awk is not recognized as internal or external command.
this is the sample .ksh script , even if i change awk to gawk it does not work its giving me syntax error, at line one ---- it's pointing ":" and "fund:"
some one plzz help.... (0 Replies)
Discussion started by: 2.5lt V8
0 Replies
3. AIX
Hi,
I have a very simple problem but I am new to scripting and I cannot find a way around it.
I am using KSH.
I have a date say
001200AM
But i want to replace the first 00 to 12 so that the format will now be:
121200AM
Can anyone help me? (2 Replies)
Discussion started by: 3vilwyatt
2 Replies
4. Shell Programming and Scripting
I am looking for a script which does the following
Script will run daily.
1.It will get snapshot off all filesystems including nfs mounts, automounts and clearcase mounts.
2.Then it will compare new snapshot with the snapshot created in the previous run.
3.If filesystem exists in... (20 Replies)
Discussion started by: saidiya
20 Replies
5. Shell Programming and Scripting
I need to write the script for the below constraints. Need your help urgently
The PATH environment variable must conform to the following:
• World-writeable directories (/tmp, /var/tmp etc) must not be placed in the PATH variable.
• System directories must always be placed before local... (1 Reply)
Discussion started by: kmvinay
1 Replies
6. Shell Programming and Scripting
Hello gurus
I am looking for a script :
We need to generate a file list created by user id on a AIX box.
Criteria 1: other than userid : dwimpid & aiadmin
Criteria 2: Files older than 2 months ( it can be any user id ).
File Path to Look: /project and /project1
Thx
silu (7 Replies)
Discussion started by: silu
7 Replies
7. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script to simplify some operations of creation file of spool for a Bulk-Copy. Thi is my code:
In a for cycle:
gzcat ${file} |awk '{ print substr($0,1,5)";"substr($0,108,122)";"substr($0,124,131)";"substr($0,139,152)";"substr($0,154,163)";"}' >>... (6 Replies)
Discussion started by: GERMANICO
6 Replies
8. Shell Programming and Scripting
Hi,
I posted a request for sever OS types earlier, but got no response. In an attempt to at least have a starting point, I think scaling it to one OS is preferred. Once I see the gist of it I can modify to account for different cases.
I need a script that will go and check to see if an LDAP... (2 Replies)
Discussion started by: tekster2
2 Replies
9. Shell Programming and Scripting
we made a script in which i am putting a day in a variable by this command
d8 = `date +%a`
after that I am checking for next working day meand week days only for eg.
if today is Monday than previous day would be Friday and
if today is Friday than next day is Monday else it would be date +1... (1 Reply)
Discussion started by: pallvi_mahajan
1 Replies
10. UNIX for Dummies Questions & Answers
from command line in AIX:
bc
18+14
32
and ctrl D to exit.
i want to write shell script:
!#/bin/ksh
startdate=18
enddate=14
cd /tmp
bc
$startdate + $enddate
my goal is to tell me end date is 14 days from today.
With 58 posts, you have been a member long enough to use good... (2 Replies)
Discussion started by: lawsongeek
2 Replies
LEARN ABOUT MINIX
suspend
suspend(1) User Commands suspend(1)
NAME
suspend - shell built-in function to halt the current shell
SYNOPSIS
sh
suspend
csh
suspend
ksh
suspend
DESCRIPTION
sh
Stops the execution of the current shell (but not if it is the login shell).
csh
Stop the shell in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su.
ksh
Stops the execution of the current shell (but not if it is the login shell).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), kill(1), ksh(1), sh(1), su(1M), attributes(5)
SunOS 5.10 15 Apr 1994 suspend(1)