10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Suppose i have a list of files in a directory as mentioned below
1. Shankar_04152019_ny.txt
2. Gopi_shan_03122019_mi.txt
3. Siva_mourya_02242019_nd.txt
..
.
.
.
.
1000 . Jiva_surya_02282019_nd.txt
query : At one shot i want to modify the above all filenames present in one path with... (4 Replies)
Discussion started by: Shankar455
4 Replies
2. Shell Programming and Scripting
Hello,
Normally below script works, could you please comment out what could be the reason of failure if there are spaces in input filename:
script.sh
#!/bin/bash
cd /home/hts/.hts/tvh/
file="$1 $2 $3 $4"
read -d $'\x04' name < "$file"
/usr/bin/ffmpeg -i ""$name"" -vcodec copy -preset... (1 Reply)
Discussion started by: baris35
1 Replies
3. Red Hat
Hi all,
as i have multiple broken pipes on ssh sessions,
i need to find out after how much time it happens,
ssh root@testServer
root@testServer's password:
ssh:notty
Last login: Thu Apr 6 06:41:16 2017 from 10.10.10.2
#
but when broke pipe happen i don't have any idea after how much... (3 Replies)
Discussion started by: charli1
3 Replies
4. Shell Programming and Scripting
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Discussion started by: nbsparks
5 Replies
5. Shell Programming and Scripting
I'd like to have the output from this script piped to a text file that has the date at the beginning of it. For example, my ideal would be something like this
$./run_script.sh
$ls *.out
2013-Feb-26-output_filename.out
Here's the code I'm using.
#! /bin/ksh
DAT=`date '+%Y-%b-%d'`
for... (2 Replies)
Discussion started by: DustinT
2 Replies
6. UNIX for Dummies Questions & Answers
uname -a
SunOS mypc 5.10 Generic_141414-07 sun4v sparc SUNW,SPARC-Enterprise-T2000
uname -a
SunOS mypc 5.10 Generic_144488-07 sun4v sparc SUNW,SPARC-Enterprise-T5220
find . -name "*.cer" -exec keytool -v -list -printcert -file {} \; | grep -i "Aug 03"
Valid from: Mon Jan 29 00:00:00 GMT... (16 Replies)
Discussion started by: shifahim
16 Replies
7. Shell Programming and Scripting
I am using ksh93 on Solaris.
Ok, this may seem like a simple request at first. I have a directory that contains sets of files with a YYYYMMDD component to the name, along with other files of different filespecs. something like this:
20110501_1.dat
20110501_2.dat
20110501_3.dat... (2 Replies)
Discussion started by: gary_w
2 Replies
8. Shell Programming and Scripting
I would like to pipe (redirect ? - what is the right term?) the output of my script to a file named with the current date.
If I run this at a command prompt:
date +'%Y%m%d"
...it returns "20110429"
OK, that's good... so I try:
./script.sh > "'date +%Y%m%d'.csv"
I get a file... (1 Reply)
Discussion started by: landog
1 Replies
9. Shell Programming and Scripting
Hi,
I have a directory with around 100k files and files with varying sizes(10GB files to as low as 5KB). All the files are having pipe dilimited records.
I need to append 7 pipes to the end of each record, in each file whose name contains _X3_ and need to append 10 pipes to the end of each... (3 Replies)
Discussion started by: nss280
3 Replies
10. AIX
Hi,
On AIX 5200-07-00 I have a find command as following to delete files from a certain location that are more than 7 days old. I am being told that I cannot use -exec option to delete files from these directories.
Having said that I am more curious to know how this can be done.
an sample... (3 Replies)
Discussion started by: jerardfjay
3 Replies