Search Results

Search: Posts Made By: isaacniu
12,543
Posted By isaacniu
sed: command garbled error
Hi all,

Suppose that I want to update the db.password entry in the below properties file,

db.username=admin
db.password=qhKkBno2U5GEq5k/dnmGPA== //I want this line to be...
2,995
Posted By isaacniu
Hi, Thanks for your reply - that works...
Hi,

Thanks for your reply - that works fine.. Just one more question, if the entry in my file is like below,


export David=???
export Michael=password
export Frank=???


and I would wish...
2,995
Posted By isaacniu
How to update an entry of another file in a Shell script?
Hi all,

Say I have a shell script called update_password.sh - in this script I want to perform a task to update a specified entry of another file (e.g. users.passpords)

update_password.sh
...
1,976
Posted By isaacniu
What's wrong with the following command?
Hi all,

I'm trying to run the following command to get all files in one directory to another with the files' timestamps preserved,

cp -p /logs/dvgbiau/batch/* /logs/dvgbiau/tmp_batch

Note...
3,395
Posted By isaacniu
Check number of files that were created before a date?
Hi all,

In a directory I have a lot of files created in history. However do I check the number of files that were created before a designated date?

Thanks
2,560
Posted By isaacniu
Encrypt password using "ENC"
Hi all,

I saw someone using ENC to encrypt password in shell script like below,

password=ENC{o6z7e9e+7zBO4EXqxRJwAYxD0Ooshr9f}

Anyone knows how could I generate the code between curly...
1,182
Posted By isaacniu
Use the print result of a script as an argument
Hi all,

Say I have a script named script.sh. What it does is to print a line like "abc"

#! /usr/bin/ksh

print "abc"


I would like to pass this value to an external variable,
...
3,676
Posted By isaacniu
Hi Agama Thanks - your advice made great...
Hi Agama

Thanks - your advice made great sense. Just one more question - if I simply run that command, it will tell me something like,

"tar: $archived_file: No such file or directory"

So...
3,676
Posted By isaacniu
zipping functionality (tar) not working as expected
Hi all,

I here have an index file ($index) which lists the full paths of some files, and am tying to use "tar" to zip all of them.

I ran a command like below,

cat $index | xargs tar -rcf...
4,366
Posted By isaacniu
Hi Corona, Thanks for your advice. I have...
Hi Corona,

Thanks for your advice. I have tried that way but unfortunately only a few of files in that list (files.txt) were zipped? Where are the other files?

Thanks
13,986
Posted By isaacniu
Hi Gary, A sample of my entry is, ...
Hi Gary,

A sample of my entry is,
/logs/dvgbiau/batch/unit_test-20120131_000943.log

If I use sed 's/.log/.log.bz2/' filename > filename.new to make the replacement, it will become...
13,986
Posted By isaacniu
Replace patterns in a file
Hi all,

I here have a file which contains a list of files inside, all of which have the suffix ".log".

And now I would wish to replace all the pattern ".log" with ".log.bz2" there. So how could...
4,366
Posted By isaacniu
Thanks for your reply. Could you please show...
Thanks for your reply.

Could you please show me a sample how tar takes arguments (file names with full paths) from a .txt file and zip them in a single file?

Thanks
4,366
Posted By isaacniu
zip files using bzip2
Hi all,

Say I've got a file /tmp/tempfile.txt which contains a list of files with full path.

Now I would wish to take all filenames in that tempfile as arguments and zip them in a single...
3,481
Posted By isaacniu
Hi ahamed, I got the problem. The output of...
Hi ahamed,

I got the problem. The output of running that jar file is a csv file. When I manually trigger the script, it understands to save the output file in the current folder. However if being...
3,481
Posted By isaacniu
Hi itkamaraj, I have actually tried that...
Hi itkamaraj,

I have actually tried that and scheduled a cron job to run the following script,


#!/bin/ksh
. /app/home/etc/sudo.profile >/dev/null
touch <absolute_path>/tmp.txt
java -jar...
3,481
Posted By isaacniu
cron job now working?
Hi all,

I wrote a script as below,


#!/bin/ksh
. /app/home/etc/sudo.profile >/dev/null

java -jar $HOME/abc.jar


The jar file abc.jar is located in the same folder as the script.
...
13,691
Posted By isaacniu
Modify the ssh_config file in Cygwin
Hi all,

I have installed Cygwin on my PC and am trying to modify the ssh_config file in the folder 'c:\cygwin\etc\defaults\etc'. However I noticed the owner of that file belongs to root....
13,496
Posted By isaacniu
ssh/sftp connection refused
Hi all,

I logged on to a Unix server and am trying to connect a remote Windows server (Windows NT) via SSH/SFTP. However I always got the following error,

sftp username@host_server (or ssh...
3,467
Posted By isaacniu
nohup not working
Hi all,

I wrote a scirpt (abc.sh) in which I defined a loop with an interval equal to 1 hour. I want this script continue to run when I close the terminal, so I ran the following command,

(in...
Forum: Solaris 12-21-2011
6,377
Posted By isaacniu
Yeah, like you said, I defined some variables in...
Yeah, like you said, I defined some variables in that particular script. Probably these variables are not recognised by the Unix environment? So what should I do in such cases?

Manually define...
Forum: Solaris 12-20-2011
6,377
Posted By isaacniu
crontab not working
Shell = ksh

Hi all,

I scheduled an automated job on my application server like below,

30 13 * * 1-5 $HOME/my_script.sh

However the script was not executed as expected. Any reason that...
7,784
Posted By isaacniu
Schedule tasks in shell script
shell=ksh,

How could I schedule tasks in shell script INSTEAD OF using the crontab -e functionality?

For example, I want a script to print "Hello World" every 10 seconds (i.e., INTERVAL =...
Showing results 1 to 23 of 23

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