Search Results

Search: Posts Made By: primo102
1,629
Posted By primo102
Thank you all, finally I use MadeInGermany code...
Thank you all, finally I use MadeInGermany code modification.
1,629
Posted By primo102
Sorry my mistake, script should be only bash. ...
Sorry my mistake, script should be only bash.


#!/bin/bash
1,629
Posted By primo102
Code optimization
Hi all

I wrote below code:


#!/bin/sh

R='\033[0;31m'
N='\033[0m'

echo " ";
echo -e "${R}Choose database $N"
echo " ";
echo "1 - db_a"
echo "2 - db_b"
echo "3 - db_c"
echo "4 -...
1,303
Posted By primo102
Add backslash and apostrophe to string in variable.
Hi All

I want to add backslash and apostrophe to variable in my bash script.


I have my variable:

USER_LIST=USER1,USER2,USER3


and I want something like this:
...
932
Posted By primo102
Thank's a lot works perfect, I completely...
Thank's a lot works perfect, I completely forgotten about case statement.
932
Posted By primo102
I would like it to be homework but it is not :) ...
I would like it to be homework but it is not :)
Yes, my mistake script has only six lines.
932
Posted By primo102
Tunnig scrip.sh
Hi All,

I wrote the following script :

#!/bin/bash

t1=serv1
t2=serv2
t3=serv3
t4=serv4
t5=serv5
t=`echo $* | awk '{print $4}'`

if [ "$t" == "$t1" ]
then
/usr/bin/zabbix_sender -c...
2,229
Posted By primo102
Switch line in txt file
Hi

I have problem with replace line in txt file , I have this string:
144185 DISK
Piece qqr8ot6l_1_1

--
144186 DISK
Piece ukr8pf2e_1_1

--
144187 DISK
Piece ter8p9gc_1_1

--...
Forum: AIX 08-12-2015
6,511
Posted By primo102
Thanks agent.kgb This is it. I change that...
Thanks agent.kgb
This is it.
I change that script and problem gone.
Forum: AIX 08-11-2015
6,511
Posted By primo102
Thanks vbe It works ps. I could remove...
Thanks vbe
It works

ps.
I could remove "null 2>&1" becouse in /dev exist another file "null" !?
Forum: AIX 08-11-2015
6,511
Posted By primo102
this: crw-rw-rw- 1 root system 2,...
this:
crw-rw-rw- 1 root system 2, 2 Aug 11 15:43 null
-rw-r--r-- 1 root system 2385088512 Jun 30 21:25 null 2>&1
crw-rw-rw- 1 root system 18, 32 Aug 08 2012 ...
Forum: AIX 08-11-2015
6,511
Posted By primo102
Size of file /dev/./null 2>&1
Hello

Can I just remove/delete flile ?
rw-r--r-- 1 root system 2385088512 Jun 30 21:25 /dev/null 2>&1

size of this flile is 2274.75 m and fill up my filesystem:

Filesystem MB...
Forum: BSD 07-29-2015
5,781
Posted By primo102
Zpool problem
Hi

I have a problem with size on zfs filesystem on FreeBSD 9.2-RELEASE-p3.

When I do this:


free01# df -Th
Filesystem Type Size Used Avail Capacity Mounted on...
Forum: Solaris 04-17-2015
1,497
Posted By primo102
Virtual Memory problem on local zone
Hi

I have a problem with Virtual Memory on one local zone (myzone1):
//from local zone (myzone1)

swap -s
total: 22888544k bytes allocated + 0k reserved = 22888544k used, 3325856k available
...
Forum: AIX 03-18-2015
1,542
Posted By primo102
AIX 6, operation on time in script
Hi

I have a question,

On linux (centos) I am executing a script:


#!/bin/bash

st1=`date "+%T"`
SD=`date -u -d $st1 +"%s"`

#some operations ...

st2=`date "+%T"`
FD=`date -u -d...
5,969
Posted By primo102
Thank's sea, I will remove 'cat' from my script,
Thank's sea, I will remove 'cat' from my script,
5,969
Posted By primo102
what can I say my blunder:) thanks
what can I say
my blunder:)

thanks
5,969
Posted By primo102
If + expr
Hi

I have bellow script:

t1=`cat node1.txt | grep thread1 | cut -f2 -d '-'`
t2=`cat node2.txt | grep thread2 | cut -f2 -d '-'`

t3=`cat node1_rcat.txt | grep thread1 | cut -f2 -d '-'`...
1,760
Posted By primo102
Thank's guys, but I am aleredy finished moving...
Thank's guys, but I am aleredy finished moving files (it took nearly six hours :))

I made and run something like this:

#move signature
#!/bin/bash

cd /mnt/upload/
ls -pl1...
1,760
Posted By primo102
Move file in to directory- script
Hi

In directory /mnt/upload I have about 100 000 files (*.png) that have been created during the last six months. Now I need to move them to right folders. eg:
file created on 2014-10-10 move to...
1,961
Posted By primo102
Thank' s Scrutinizer for tip Works in that...
Thank' s Scrutinizer for tip

Works in that form :
ssh node8@192.168.1.8 'while read line; do ls -l "$line"; done <<< '"'$cp_date'" > lsl.txt
1,961
Posted By primo102
While read line via ssh
Hi

I have a question,

Why below script does't work ?:

#!/bin/bash
cd /home/weblogic/
cp_date=`awk -F '/' '{print "/" $8 "/" $9 "/" $10}' file_ftp.txt`

ssh node8@192.168.1.8 'while read...
1,477
Posted By primo102
Ok , now it is clear to me , but to use this...
Ok , now it is clear to me , but to use this method I must calculated If I will have enough free disk space,
ThankS very much RudiC
1,477
Posted By primo102
I think I can't use option -r because e.g file 1...
I think I can't use option -r because e.g file 1 on local server name "701_0001.png" but on remote server it must name "p0330223723074.png" (first of course I must create directory "pk21730")
1,477
Posted By primo102
Thank's RudiC I changed the loop to create...
Thank's RudiC

I changed the loop to create directories on a remote location
was:
for file in $(echo $client);
do ssh node2@192.168.1.190 mkdir -p /tmp/$file;
done;
is now:
ssh...
Showing results 1 to 25 of 26

 
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy