Stack Exchange Network

Stack Exchange network consists of 174 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.

3
votes
2answers
48 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
26 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=`...
0
votes
2answers
29 views

SMTP Email not sent using cronjob - AIX [closed]

I have a bash script that sends email via SMTP server. It works perfectly and sends email when I execute it manually, but when it is executed using a cronjob it does not send the email. I am using AIX ...
0
votes
0answers
24 views

Find who/what deleted files/folders on AIX [closed]

For some reason, several folders vanished overnight on a AIX 5.3 machine and even if checked the history for all users including root I couldn't find any command related to their deletion so I guess ...
2
votes
3answers
44 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
40 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
18 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
42 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
0answers
24 views

How to Limit AIX print queue

I need to limit the size of the print queue on AIX. Either by number of queued files or by total file size. It is needed to prevent /var from filling up such that space is available for other items, ...
-1
votes
2answers
38 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
143 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
74 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
27 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
65 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
28 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
89 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
29 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
60 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
43 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
49 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
21 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
39 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
50 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
115 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
52 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
43 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
0answers
86 views

Curl 7.27.0-1 Symbol Resolution Failed Error

On an AIX 5.3 I have installed curl 7.27.0-1 through .rpm's and if I try to use it by issuing a curl -V command I am getting this error: Could not load program curl: Symbol resolution failed for /opt/...
0
votes
1answer
47 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
80 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
43 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 ...
1
vote
1answer
58 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
15 views

setting a remote stdout into local KORNSHELL variable

I'm writing a script that others here on Unix & Linux have been graciously assisting me on. The idea is to compare MD5 checksums between a local file and a remote one. The local file checksum is ...
1
vote
1answer
173 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 ...
0
votes
0answers
59 views

aix extract fields from entstat command

I was collecting the SEA adapter and its related etherchannel and Network adapters status from the enstat command below. I want to extract the fields from the below command output. ETHERNET ...
-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
35 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....
1
vote
0answers
32 views

AIX auditpr timestamp format

Is there a way to customize the timestamp format that the auditpr command on AIX generates? I am logging to binary, and when I use auditpr to read the binary audit logs, I get something similar to : ...
0
votes
1answer
152 views

How to pinpoint what process uses the disk using NMON on AIX

On an AIX 7.2 machine I need to investigate what is causing daily slowdowns between certain hours, and after analyzing the .nmon files using the nmon analyzer excel I've found that indeed the Disk ...
-1
votes
2answers
35 views

reestablish root shell

I disabled the shell of user root with the command chuser shell=/bin/false root and now I cannot switch to root with sudo su -. PermitRootLogin is disabled too, so I don’t know how could I reestablish ...
1
vote
2answers
249 views

Removing characters with sed [duplicate]

I am working on AIX unix and trying to remove non-printable characters from file the data looks like Caucasian male lives in Arizona w/ fiancÃÂÃÂÃÂÃÂÃÂ in file when I view in Notepad++ using UTF-8 ...
0
votes
1answer
16 views

TCB Enabled During Upgrade

I'm pretty sure I know the answer to this, but I wouldn't be doing my due diligence if I didn't ask: I know that you can only enable TCB in AIX during install, but what about during an upgrade? Can ...
5
votes
0answers
57 views

Random errors thrown by Bash shell: cannot open named pipe [duplicate]

I have found that keeping a detailed log of every command I run, from which path I ran it from and which user I sudo'd from, is extremely valuable as the years go by and I'm trying to remember what I ...
0
votes
1answer
31 views

AIX Does not support bc boolean expression [duplicate]

I ran into an issue where bc does not have boolean expressions in the AIX system. Wondering if there is a replacement command so I don't have make my code any longer? This is in a bash script. Here ...
3
votes
1answer
43 views

chfs does not work in a login ksh shell [closed]

I can't find a reason why chfs command fails in ksh (I open ssh sesion with putty). But when I run ksh or ksh93 in the shell again then it works. Any clues? # alias|grep chfs # type chfs chfs is /...
0
votes
2answers
287 views

change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss

How do I change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss which is displayed as an output (eg. JOBNAME1 STARTED AT 20180904152402) from a command... grep JOBNAME1 | sed -e s/|/ /...
0
votes
2answers
75 views

ttdbserver and inetd

If I disable ttdbserver service in an AIX server (I commented the line with # in /etc/inetd.conf): #ttdbserver sunrpc_tcp tcp wait root /usr/dt/bin/rpc.ttdbserver rpc.ttdbserver ...
-1
votes
1answer
33 views

Error Displaying last 10 minutes log with awk [duplicate]

I am using below command to display log data for last 10 mins. It works fine if the month stays same however when month is changed it doesn't show any data. awk -v d1="$D1" -v d2="$D2" '$0 > d1 &...
1
vote
3answers
157 views

Display lines in last 10 minutes with specific pattern in logs

I need to display lines with Error occurred in last 10 minutes of a log file. Aug 26 10:50:42 Normal line. Aug 26 10:51:23 Normal line. Aug 26 10:55:33 Error line. Aug 26 10:56:45 Normal line. Aug ...
0
votes
2answers
26 views

Segregate Data in Log files

I want to segregate error types in my log file. I am unable to make a logic for it. Suppose i have these different types of errors in a log file. Now i want to extract those types only. Like in below ...
0
votes
2answers
143 views

Starting a Script at System Boot on AIX 7

I want to know how can I start a script at the system startup. I tried to make a sh file under /etc/rc.d/rc3.d/ but I rebooted the OS and it does not start my script as I want.