02-10-2012
@faceonline this is something in shell scripting, it is input redirecting from the files named list2 and list3
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
When I run following script
#!/bin/bash
cd ~/directory1
mv `ls -trF | grep -v / | tail -10 ` ~/directory2
works fine with filenames not having any space but runs into issues with filenames that have spaces tried with $file variable still doesnot work. Can someone help me (4 Replies)
Discussion started by: asakhare
4 Replies
2. Shell Programming and Scripting
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
Discussion started by: jamshedj
3 Replies
3. Shell Programming and Scripting
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Discussion started by: mr_crosby
3 Replies
4. Shell Programming and Scripting
Hi,
I've a problem. Here is the code:
#!/bin/ksh
echo "enter a file name"
read a
cd /home/linux1/sam
if
then
echo "file exists"
cp $a $a_bkp
else
echo "file doesn't exist"
fi
when executed the o/p is:
enter a file name
contact
file exists
cp: missing destination file (4 Replies)
Discussion started by: sam_bd
4 Replies
5. Shell Programming and Scripting
Hi,
I have files with filenames as below.
SGM Daily Sales Email-en-us-05312012.xlwa
I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders.
I have the following script.
#!/bin/ksh
for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies
6. Solaris
Hello
I am copying a tar from windows7 to Solaris with filezilla i could see, some characters in the name of the file get deleted.
I could see only substring of the filename
eg: original filename :abcdefghijklmnopqrstu.h
i can see like abcdefghijklm
solution to this problem is highly... (2 Replies)
Discussion started by: Revathi R
2 Replies
7. Shell Programming and Scripting
Hi ,
I'm trying to move/copy the files inside the loop into a directory .
I tried the below code and the issue is the data is not copying into the created directory but the files are copying into another file
file_path="/home/etc"
Last_Day=20130930
mkdir $file_path/ARC_${Last_Day}
... (3 Replies)
Discussion started by: smile689
3 Replies
8. Shell Programming and Scripting
Hi,
I have a list of filenames in the format with Spaces in the filename.
As an example :
Sample File 1.txt
Sample File 2.txt
Sample File 3.txt.....I have about 100 files like this.
I am trying to create a block of code or use an available command to a) Create a file b) Put in some... (2 Replies)
Discussion started by: ban3rj33
2 Replies
9. Shell Programming and Scripting
I have a folder with files and I have to process them in a loop. However the filenames have space characters, so the list get split.
$ touch "File Number_1"
$ touch "File Number_2"
$ ls "/tmp/File Number"_*
/tmp/File Number_1 /tmp/File Number_2
I tried following (sorry for using the... (3 Replies)
Discussion started by: Wernfried
3 Replies
10. Shell Programming and Scripting
Hello,
I wrote a simple script, that basically wait for a *.dat-file in a certain folder, which is always a zipped file and extracts it.
It worked before and i changed nothing in the script, but since last week i have the problem, that it doesnt extract files containing a space. How do i make... (4 Replies)
Discussion started by: blend_in
4 Replies
CRON(8) System Manager's Manual CRON(8)
NAME
cron - clock daemon
SYNOPSIS
/usr/sbin/cron
DESCRIPTION
Cron executes commands at specified dates and times according to the instructions in the files /etc/crontab and /etc/crontab.local. None,
either one, or both of these files may be present. Since cron never exits, it should only be executed once. This is best done by running
cron from the initialization process through the file /etc/rc; see init(8).
The crontab files consist of lines of seven fields each. The fields are separated by spaces or tabs. The first five are integer patterns
to specify:
o minute (0-59)
o hour (0-23)
o day of the month (1-31)
o month of the year (1-12)
o day of the week (1-7 with 1 = Monday)
Each of these patterns may contain:
o a number in the range above
o two numbers separated by a minus meaning a range inclusive
o a list of numbers separated by commas meaning any of the numbers
o an asterisk meaning all legal values
The sixth field is a user name: the command will be run with that user's uid and permissions. The seventh field consists of all the text
on a line following the sixth field, including spaces and tabs; this text is treated as a command which is executed by the Shell at the
specified times. A percent character (``%'') in this field is translated to a new-line character.
Both crontab files are checked by cron every minute, on the minute.
FILES
/etc/crontab
/etc/crontab.local
7th Edition October 23, 1996 CRON(8)