10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I have this script to count the number of files based on prefix and suffix values.
#!/bin/ksh
file_date=$1
prefix=$2
suffix=$3
file_count=$(ls -l /db/day_file/{$prefix}*${file_date}*{$suffix})
The files in the directory /db/day_file are as below.
20170501
20170501... (7 Replies)
Discussion started by: nalu
7 Replies
2. Shell Programming and Scripting
Hi everyone,
i have the following script.sh:
foo='lsusb | grep Webcam | cut -c16-18'
sudo /home/user/public/usbreset /dev/bus/usb/001/$foo
when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Discussion started by: hilfemir
6 Replies
3. Shell Programming and Scripting
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
Discussion started by: wolf@=NK
3 Replies
4. Shell Programming and Scripting
Hi,
I have a problem with a SED script that works fine on AIX but does not work properly on a Solaris system.
The ksh script executes the SED and puts the output in HTML in tables.
But the layout of the output in HTML is not shown correctly(no tables, no color). Can anyone tell if there is... (7 Replies)
Discussion started by: Faith111
7 Replies
5. Shell Programming and Scripting
Hello,
i have below shell script to process ftp get from server and create file list afte finish.
this shell scipt has 6 parameter input.
unfortunately, it is only working to get the file and terminated before creating file list.
please help.
thanks,
#!/bin/ksh
## example usage :... (3 Replies)
Discussion started by: daryatmo
3 Replies
6. Shell Programming and Scripting
Hi ,
I am using the below command in script. $_IDLETIME is returning value if i execute the script manually.
sar > $_LOCATION/sar.txt
_IDLETIME=`tail -2 $_LOCATION/sar.txt | head -1 | tr -s ' ' ' ' | cut -d ' ' -f8 | cut -d '.' -f1`;
if
But it s not returning any value if it put the... (3 Replies)
Discussion started by: ahamed
3 Replies
7. Shell Programming and Scripting
Hi GURU's,
I'm using a Shell Script to send email's as an attachment.
I'm Storing the email address in a table and catching in a variable.
MAILLIST=`noarg sqlplus -s $OraUsr << EOF
set heading off
set feedback off
set echo off
SELECT email_ids
FROM tpemail_table
WHERE... (9 Replies)
Discussion started by: karthikraj
9 Replies
8. Shell Programming and Scripting
Hello all,
I have a file - 12.txt
cat 12.txt
===============================================
Number of executions = 2 Total execution time (sec.ms) = 0.009883
Number of executions = 8 Total execution time (sec.ms) = 0.001270
Number of... (23 Replies)
Discussion started by: Rahulpict
23 Replies
9. Shell Programming and Scripting
Hi, I'm new here an dlearning a lot from this forum. i didnt find any solution for this in the forum.
I have already checked in folders in subversion named
HTT01,... HTT21.. and have files in each folder like below:
HTT01/HTT01_00000.hex
HTT01/HTT01_00000_fb_result.hex... (2 Replies)
Discussion started by: ravishan21
2 Replies
10. Shell Programming and Scripting
Hi,
I have one file stat.
Stat file contents are as follows: for example.
H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000
H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000
Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies