Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [aix]

AIX (Advanced Interactive eXecutive, pronounced "a i ex") is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms.

1
vote
1answer
12 views

Remove multiple CIFS shares using for loop in AIX

I want to unmount multiple CIFS shares on my AIX LPAR using for loop. I created a file named cifs.txt containing all CIFS shares. Will my command work? for i in $(cat cifs.txt); do rmcifsmnt -f $i; ...
1
vote
1answer
35 views

Unable to install any rpm package in AIX after removing some packages

We have an AIX 6.1 server which was working; it does not have most of the freeware packages: root@srv/ins:rpm -qa cdrecord-1.9-7 mkisofs-1.13-4 vnc-3.3.3r2-6 openssl-0.9.7l-2 unzip-5.51-1 bash-4.2-3 ...
4
votes
2answers
460 views

Determine the application client is using to connect

Is there any way in Linux/Unix to determine the client application user is using to connect to OS. In our environment thousand of users connect to our system via client applications like WinSCP, ...
0
votes
1answer
32 views

Ambiguous error while executing ksh file

I have created a audit.ksh file which is used to clear old "*.aud" files. But when i run this file am getting below error. The strange thing is the commands inside the file works fine while executing ...
1
vote
2answers
50 views

How add new lines between rows and start and end position of the csv file

The below input data contains table attribures with header information. The expected output is given below as well where the header and newline with intended text. This is expected as and when there ...
5
votes
1answer
235 views

Unix AIX passing variable and arguments to expect and spawn

I am writing a script to scp some files but need to pass file location through the user or another script as an argument #!/usr/bin/expect set FILEPATH1 $1 spawn sh "scp $FILEPATH1 $USER@$HOST:/...
1
vote
0answers
31 views

How to install PHP 7.2 on AIX 7.2 machine? [closed]

My application is running inPHP 7.2. First step is to install RPMs from the .deps file. In this website, http://www.perzl.org/aix/index.php?n=FAQs.FAQs#rpm-dependency-hell under A solution to the RPM ...
1
vote
2answers
86 views

script with date work on Linux but not on AIX

I wrote a script to that works fine on Linux but fails on AIX 7.2. My script uses the command date with -d. The purpose of this script is to get the last day that is not a Saturday, Sunday or a ...
1
vote
1answer
61 views

AIX 7.2 Topas show high CPU

When I execute topas for a certain process, in the CPU% column it shows me 43% and jumping to 85%. When I execute: "ps aux | grep processName" The same process is at 5%. What is more accurate? I ...
1
vote
4answers
123 views

List of nfs mounted filesystems in AIX

I wanted to get the list of nfs mounted filesystems from some file present in the AIX machine. Is it present in some file? Currently, the only way that I know, is using mount system call and then ...
0
votes
0answers
53 views

Completely Clear command prompt through bash

I am actually making a menu for my official server. I made it through bash scripting on AIX. The problem i am facing is that when script is running, user can scroll up and see history of all commands ...
2
votes
1answer
372 views

How can I get files using find command

How to use find command to get only files from the current directory (excluding subdirectories and its files) older than a day on AIX?
0
votes
0answers
41 views

pssh multiple server execute command as root

I try to use pssh to execute command on multiplate server. And I have error [5] 14:38:01 [FAILURE] xcasw2828102sj Exited with error code 126 sh: /bin/chpasswd: 0403-006 Execute permission denied. ...
1
vote
1answer
61 views

IF statement AIX (Korn Shell Script)

I've made a script which collects info. One of the things it does is checking if a file or directory exists. If yes, it copies it to the /tmp directory. The script fails with 0403-057 Syntax ...
2
votes
0answers
50 views

'Out of Memory' on AIX installing Perl Module [closed]

Getting out of memory error trying to install NetFTPSSL perl module on IBM P750 running AIX 7.1 with 76GB of memory. root@polarprod-cip(/)# perl -MCPAN -d -e 'install Net::FTPSSL' Loading DB ...
2
votes
0answers
55 views

AIX : NOFOLLOW_LINKS is not supported on this platform

I have an AIX 7.2 machine. I am trying to run a Java program on it. It gives me this error: NOFOLLOW_LINKS is not supported on this platform. It is because I am using this call in the program: Files....
0
votes
1answer
27 views

AIX process stack watermark

Does exist any tool/command for checking the maximum that a process stack has used? I need that to tune the stack size configuration for a program.
0
votes
2answers
73 views

How could I know inside a script if stdout has been redirected for it?

I have a script in ksh; depending whether there is a redirection from the command line, I redirect the output via a exec 1>file. How can I test from inside the script itself if the command calling ...
0
votes
0answers
24 views

Over-allocation of memory in AIX/UNIX

Just finished my research regarding over-allocation's negative impact to VMs (Wintel). Over-allocation - usage is 2vCPU | allocated is 32vCPU I have not found any link regarding any negative impact ...
3
votes
2answers
84 views

A Unix AIX variable without a $ symbol?

I'm trying to debug an existing program and found an if condition without $ symbol prefixed to it. Values are: dt_val=1234 prev_dt_val=1234 If condition goes like: if [ dt_val -eq prev_dt_val ] ...
1
vote
1answer
45 views

kornShell and AIX unable to create an Array Variable

LS=`ls "$SRC_PATH"/* | grep -i -v *.ignore` I cannot use for loop as I need to check conditions with while as there are multiple conditions. Trying to access the content using ${LS[$CNT]} CNT=`...
2
votes
3answers
48 views

print all 3-character-sub-directories using shell script in AIX

In my system, there is a /Test directory under which many directories are available. I want to print all directories with 3-character-name, in AIX system. I got code for Gnu/Linux. find /test -...
1
vote
0answers
160 views

Get/Set environment variables in a different tty

I'm using a tool (Autokey) that spawns in a new shell. Cool tool, but I want to pull info from my current shell. Say I'm on pts/0 and I have a variable set: VAR1=yes. In another shell, I want to be ...
1
vote
0answers
21 views

AIX 6.1 versus AIX 7.1 strange behaviour [duplicate]

I have this logic in a ksh script on AIX 6.1 and it works fine. integer loop_count=0 integer sleep_interval=5 integer alarm_interval=60 if (( $loop_count*$sleep_interval%$alarm_interval -eq 0 )) then ...
0
votes
2answers
74 views

Extracting part of string from a file in ksh environment

I have a file that has error messages as per below rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1505) rsync error: error in rsync protocol data ...
-1
votes
2answers
88 views

How to find files containing set of words on linux [closed]

I have number of text files line fruit1, fruit2, fruit3, fruit4 and so on in one directory. Now I want to find the files which contains all three words "Appale" , "Banana" & "Orange". All three ...
3
votes
1answer
196 views

grep: Not a recognized flag: o

I am trying to extract the date and timestamps from my log file string ($Data in the below code) on AIX using a regex and loading it into a text file as below: Data="Logs/2018-12-03/log.txt:3:2018-12-...
-1
votes
2answers
1k views

how to grep a value stored in a variable [closed]

i am writing a bash script in which i am storing current date in a variable and then i am greping that variable . issue is its not working currentdate= $(date +%b\ %d) echo "$currentdate" last |grep ...
0
votes
1answer
35 views

In Linux, how can I set a Function globally

In AIX, I have a, FPATH set function, which is globally accessible by just calling the function name. I am trying to replicate this functionality in Linux. I set the function in $PATH variable, I ...
0
votes
1answer
392 views

How to download https file in AIX without wget and curl? [duplicate]

In an UNIX environment running AIX where I'm a not privileged user (without sudo) if I need to download a file from HTTPS server and there is no wget or curl... How I do it? Is there any replacement ...
0
votes
1answer
35 views

Test for network connectivity from various hosts to one specific host via ssh and telnet

I am trying to see if a port is opened for a list of hostnames/IP's, and I used a simple script like this one to ssh to each host and capture the output. for i in `cat $1` do ssh $i "sleep 5 | telnet ...
2
votes
1answer
333 views

Alternatives to cURL/wget for remote API calls

I'm on IBM AIX 7.1 where cURL and wget are not available. Also, I'm not in a position to install either. Are there alternatives that would be available that would enable remote API calls using GET/...
0
votes
2answers
33 views

Replace @@@ and NotApplicable string and redirect output to other file? [duplicate]

I'm using IBM AIX which doesn't have much support like sed -i and sed with \t is not working in my case. I would like to replace replace NotApplicable string with a single space ' ' then replace @@@ ...
1
vote
1answer
149 views

Align columns evenly without “column - t”

I have an output file created from a Korn shell script. I need to align the output with spaces evenly. Unfortunately column -t is not available on AIX. Actual File: X1vir1000 x1-DFB127 ...
0
votes
1answer
95 views

How can I adapt this bash progress bar function for AIX ksh88? [closed]

I have a bash script for progress bar and I use it when I work in bash: #!/bin/bash prog() { local w=80 p=$1; shift printf -v pt "%*s" "$(( $p*$w/100 ))" "";pt=${pt// /.}; printf "\r\e[...
0
votes
1answer
124 views

I need to replace a string in html sed is not working

Here is the code in the shell script I have used sed 's/xyxx/$date1/' /u001/Scripts/abc.html > /u001/Scripts/abc.html The code is trying to print HTML tags inside AWK command nawk 'BEGIN{ ...
1
vote
0answers
25 views

Change errpt logs language for AIX systems

I have AIX 6.X and 7.X systems installed having FR as the default language; as expected, the errpt command's output is in FR. Is there a way I can generate the errpt logs in EN without changing its ...
1
vote
2answers
40 views

Grep multiple lines with different patterns [closed]

I have this test.debug file in AIX unix with the following fields: in[ 2: ]<0000********0000> in[ 3: ]<0> in[ 4: ]<000000020000> in[ 7: ]<1113> in[ 7: ]<80402&...
0
votes
1answer
319 views

Read only access to directory for specific users on AIX box

We are having user1 and user2 in AIX server (7100-04-05) and we need to give readonly access to path /data/web/tmp/* (they need to be able to read contents of files). With AIXC access list we can give ...
1
vote
2answers
303 views

Concatenate a string with a variable in grep command

I have to search by this pattern: _20181106 20181106 is yesterdays date, so it has to be be a variable like TZ=aaa24 date +%Y%m%d How can I search a file with this pattern? I'm working with AIX
1
vote
3answers
54 views

How to add a path before the first character of each line in a file.txt and save the same file with those edits? [duplicate]

I have a file that has some lines like: account_1 account_2 account_3 I have to add a path like /home/info/ before each line and save the same file with those updates like this: /home/info/...
1
vote
1answer
52 views

What is the easiest way to grep the command output? [duplicate]

I a trying to grep for certain string after issuing the grpck -n ALL command so when trying grpck -n ALL | grep -i format, for example, I still see the whole output and not just the lines containing ...
0
votes
1answer
49 views

Use small script inside another On AIX, or a solution in a single command

I want put on a small script (perl-script.pl) inside another in order to use use it with a find command, like this: #Saving the previous permission information for a possible recovery. case "$STAND" ...
1
vote
1answer
174 views

How to use istat on AIX like stat on Linux distributions

In Linux, I use the following command to show this output: find /backup/$INSTANCE/tsm/* -exec echo '"{}" ' \; | xargs stat --printf "chown %U:%G '%n'\nchmod %a '%n'\n" >> /tmp/permissions.txt ...
1
vote
2answers
108 views

AIX Unix - How to Find and Remove files created between date period, with starting and ending characters?

I'm using IBM AIX Unix and it's limited with command option. I want to implement below filter criteria using find and mtime (which works) option. I would like to remove the files listed with below ...
3
votes
2answers
186 views

After an AIX mksysb NIM migration upgrade, virtual package AIX-rpm is out-of-sync with the OS level

After upgrading an AIX system using mksysb migration via NIM, the AIX-rpm virtual package was left behind at the previous AIX level: $ oslevel -r 7100-04 $ rpm -q AIX-rpm AIX-rpm-6.1.7.0-7 This ...
1
vote
1answer
18 views

setting a remote stdout into local KORNSHELL variable

I'm writing a script. The idea is to compare MD5 checksums between a local file and a remote one. The local file checksum is saved into a local variable: LOCALMD5=!chsum "$(basename "$file")" I ...
1
vote
1answer
240 views

Using korn shell to compare local and remote MD5 over sftp

I am in need of creating and checking checksums between a local file, and the remote file I just pushed. If the MD5 checks, continue, else break. This needs to be in KORN shell scripting because we ...
-1
votes
1answer
20 views

How can I get a count of a Word called 'MSH' used multiple times in a file with a single UNIX command - AIX 6.1?

How can I get a count of a Word called MSH used multiple times in a file with a single UNIX command - AIX 6.1 ?
1
vote
1answer
36 views

Creating empty copies of files with new extensions

I have AIX 7.1. Let's say I have a directory with files like these: 1.txt lala.csv I need to create empty copies of these files with a new extension in the same directory, like so: 1.txt.done lala....