I have one other script with grep and sed commands which creates the mentioned above temp files. It looks like this:
Is there a way to join the above two scripts together, so that the script would execute the command in the following order for every subfolder in the main directory:
1. enter first subfolder and execute the grep and sed commands, creating the merged file in the current folder;
2. rename the merged file in the first subfolder to the name of the subfolder;
3. exit the first subfolder;
4. loop script with all subfolders until the end.
How do I pack (using tar zcvf ?) the current folder inluding all files and folders ??
I need to be sure to get all files and folders/subfolders...
Later I will unpack into a new folder on a new server..
Appreciate any help.. (3 Replies)
Alright, I am sure this is a laughable question, but I don't know so I am going to ask anyway.
I have a little script I am writing to take information from one source, recode it in a certain way, and print to files for each subject I have data for. This all works perfectly. I just want to put... (6 Replies)
Hi gurus,
I have set of files in a directory
ex : test_file1.csv
test_file2.csv
test_file3.csv
my requirement is to copy these files into another directory but with date appended to the name :
like after copying the files should look like : test_file1_07072008.csv
... (7 Replies)
How do I find files in current folder only?
We are on AIX 5.3, so maxdepth is not supported.
I tried to do this
find /dir1/dir2/dir3/dir4 -prune -type f
to display all files in /dir1/dir2/dir3/dir4 only but it does not show any files.
Somehow the -prune option works for dir3 level... (7 Replies)
Hello guys,
I am sure this has been asked before, but honestly, I cant find post talking about it.
Here is what I need:
- A tar file will be generated manually by user
- This tar file is then used within a bash shell script
My source folder structure is like this:
... (2 Replies)
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and
I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server
$ cat temp.txt
RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
LEARN ABOUT HPUX
mailfrom
mailfrom(1) General Commands Manual mailfrom(1)NAME
mailfrom - summarize mail folders by subject and sender
SYNOPSIS
status] [folder|username]...
DESCRIPTION
The command reads one or more mail folders and outputs one line per message in the form:
from [subject]
where from is the name of the person the message is from, and subject is the subject of the message, if present. If determines that the
message is from you, the from portion will read where user is the user the message was sent to. This happens when you receive a copy of a
letter you sent.
The default folder is your incoming mailbox, See the Operands subsection below.
Options
recognizes the following options:
Print a brief help message summarizing the options.
Number the messages using the same numbering scheme used by
Very quiet mode.
Only error messages are produced. This option is useful in shell scripts, where only the success or failure of the
program is important, and output is not desired.
Quiet mode. Output only a one-line summary for each mailbox or folder.
Add a summary of the number of messages by message status in each
mailbox or folder. To get the summary only, use this with the option. The summary has the form:
If an item count, n, r, or u is zero, the line is omitted.
Only display headers from messages with the given status.
status can be one of or and are equivalent. The option can be repeated to print header information from more than
one category, for example, only new and unread messages. The values can be abbreviated to their first letters. The
default is all messages.
Tidy mode. If the from field is long enough to displace the subject field from its normal start column, move the subject down
onto the next line.
Verbose mode. Print a descriptive header before listing the contents of each mailbox or folder.
Operands
recognizes the following optional operands:
folder|username
A file name or the name of a mail user on your system. You can use the format to specify a folder in your mail
directory, defined by the string variable in your configuration file.
searches for the value as a file name relative to your current directory. Then, if the file name is not an absolute
path, it searches for the value relative to the incoming mailbox directory, The first file found is selected. You
must have read access to the file.
RETURN VALUE
returns the following values:
Messages matching
status are present.
No messages matching
status are present, but there are some messages.
There are no messages at all.
An error occurred.
If multiple mailboxes or folders are specified, the exit status only applies to the last one examined. This can be used in scripts to
determine what kind of mail a user has.
EXAMPLES
Display header information from all the messages in your mailbox.
Display header information from all new messages in your mailbox.
Assuming you have the proper file permissions to read mail, print out header information from all new and unread messages in incoming mail-
box.
Print only a summary of how many new, unread, and read messages are in your incoming mailbox.
AUTHOR
was developed by HP.
FILES
Your configuration file.
Directory of incoming mailboxes.
SEE ALSO elm(1), mail(1), mailx(1), readmail(1).
mailfrom(1)