10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi all,
Given here under a section of a script I am using.
SIMDIR="/home/Ins/forces"
cd $SIMDIR
for file in `ls *.forces`
do
basename=`echo $file | sed 's/\.*$//'`
extname=`echo $file | sed 's/*\(*\)\.\(.*\)/\2\1/'`
echo "Processing file: "$basename
python convert.py... (4 Replies)
Discussion started by: Theo Score
4 Replies
2. Shell Programming and Scripting
Hi I want to know how to handle the spaces in the below scenario.
I have a file (CON_zip_path_1.txt) which has some directory paths with spaces in directory names . My requirement is to unzip these zip files to
another path. Please see the code below and the error.
CON_zip_path_1.txt... (4 Replies)
Discussion started by: paul1234
4 Replies
3. Shell Programming and Scripting
I love the -newerct flag for the Cygwin find command on windows.
Can I use "/usr/bin/find . -newerct '3 hours ago'" to conditionally copy a directory tree so that only the files in the directory tree that are younger than 3 hours are copied to my destination directory such that the directory... (4 Replies)
Discussion started by: siegfried
4 Replies
4. UNIX for Dummies Questions & Answers
1.1 Solaris 10 8/07 s10s_u4wos_12b SPARC
1.2 Patch: 127714-03 Obsoletes: Requires: 120011-14 Incompatibles: Packages: SUNWsshcu, SUNWsshdu, SUNWsshu Patch: 128253-01 Obsoletes: Requires: Incompatibles: Packages: SUNWsshcu Patch: 126630-01 Obsoletes: Requires: Incompatibles: Packages: SUNWtcsh
1.3... (3 Replies)
Discussion started by: alvinoo
3 Replies
5. Shell Programming and Scripting
I'm using cygwin32 on Windows.
DN is an environment variable pointed at my download directory.
This command works to move the single most recent file in my download directory to my current directory:
mv "`perl -e '$p = $ARGV; opendir $h, $p or die "cannot opendir $p: $!"; @f = sort { -M $a... (2 Replies)
Discussion started by: siegfried
2 Replies
6. Shell Programming and Scripting
echo "1.1 Apply latest OS patches;"
awk '/1.2 Install/ {P=0} P {print $0} FNR==1{printf("From file %s:\n", FILENAME)} /1.1 Apply/ {P=1}' solarisappsummary.txt solarisdbsummary.txt solaris_websummary.txt
echo "1.2 Install TCP Wrappers;"
awk '/1.3 Install/ {P=0} P {print $0}... (1 Reply)
Discussion started by: alvinoo
1 Replies
7. UNIX for Dummies Questions & Answers
Very new to shell scripting. Not sure if my title is correct but I will try and explain.
Directory has 100+ files with this format, " ABCD_ABC_Abc_AB0126.abc ". When a new file gets created, the 16-19 characters in the file name gets incremented by 1. Ex...todays most recent file is... (14 Replies)
Discussion started by: askvip
14 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am coding for a requirement where I need to read a file & get the values of SUB_DATE. Once the dates are found, i need to move the files based on these dates from one directory to another.
ie, this is how it will be in the file,
SUB_DATE = 20120608,20120607,20120606,20120606... (5 Replies)
Discussion started by: dsfreddie
5 Replies
9. Shell Programming and Scripting
Hi,
I am running this command through a shell script and getting the error mentioned in the subject line:
testing.awk -f x.txt TNAME
My testing.awk file contains something like
++++++++++++++++++
#!/usr/bin/awk -f
BEGIN{
TAB_NAME="INSERT_ONE_" ARGV ;
}
if ( $1=="JAM_ONE" &&... (1 Reply)
Discussion started by: kunwar
1 Replies
10. Shell Programming and Scripting
Hi people,
Please some help over here.
I have logs in a directory, in which I need to get the most recent file in order to put it within other command.
The format of the files are
loadfiles20090308094339_41
loadfiles20090308094418_42
loadfiles20090308095457_43... (4 Replies)
Discussion started by: cgkmal
4 Replies