10-12-2012
Thanks @pamu .. new code works and able to solve issue#2 in my earlier post. can you pls have a look at issue#1 in earlier post pls
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to split a file into n separate files of about the same size. The way the file will be split is at every nth row, starting with the first row, that row will be cut and copied to it's corresponding new file so that each file has unique records. Any 'leftovers' will go into the last file. e.g.... (4 Replies)
Discussion started by: sitney
4 Replies
2. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
3. Shell Programming and Scripting
I know this is a simple matter, but I'm new to this.
I have a shell script that calls a sed script from within it. I want the output of the shell script to be based on the input file I pass as an argument to the original script. In other words...
./script.sh file.txt
(script.sh calls sed... (2 Replies)
Discussion started by: estebandido
2 Replies
4. Shell Programming and Scripting
Hi,
I need to split files based on text:
BEGIN DSJOB
Identifier "LA"
DateModified "2011-10-28"
TimeModified "11.10.02"
BEGIN DSRECORD
Identifier "ROOT"
BEGIN DSSUBRECORD
Owner "APT"
Name "RecordJobPerformanceData"
Value "0"
... (16 Replies)
Discussion started by: unme
16 Replies
5. Shell Programming and Scripting
I have a source file that contains multiple XML files concatenated in it. The separator string between files is <?xml version="1.0" encoding="utf-8"?>. I wanted to split files in multiple files with mentioned names. I had used a awk code earlier to spilt files in number of lines i.e.
awk... (10 Replies)
Discussion started by: santosh2k2
10 Replies
6. Shell Programming and Scripting
I have below script which does splitting based on a different criteria. can it be amended to produce required result
SrcFileName=XML_DUMP
awk '/<\?xml version="1\.0" encoding="utf-8"\?>/{n++}
n{f="'"${SrcFileName}_"'" sprintf("%04d",n) ".txt"
print >> f
close(f)}' $SrcFileName.txt
My... (3 Replies)
Discussion started by: santosh2k2
3 Replies
7. UNIX for Dummies Questions & Answers
Dear unix forum,
could I output a list of five books with their file name titles into one file?
In order o output all the contents of all the files with their file names there was: find . -type f | while read x; echo -e "\n$x";cat "$x";done > бетховен.txt
In spite of them being successively... (5 Replies)
Discussion started by: Xcislav
5 Replies
8. Shell Programming and Scripting
Hello,
I am trying to print searched multiple keywords in multiple files.
It is almost okay with the code but the code puts filename in front of each line.
How may I get rid of it?
-grep -A1 'word1' *.txt | grep -A1 'word2' | grep -A1 'word3'
I expect:
Real outcome:
How may I... (3 Replies)
Discussion started by: baris35
3 Replies
9. UNIX for Beginners Questions & Answers
Hi everyone :)
I have a file "words.txt" containing hundreds of lines of text. Each line contains a slogan.
Using the code below i am able to generate an image with the slogan text from each line.
The image filename is saved matching the last word on each line.
Example:
Line 1: We do... (2 Replies)
Discussion started by: martinsmith
2 Replies
10. Web Development
How can I get the name of the default output filename from curl using the argument -O?
Using -o one can choose a filename. I want to get the name of the original file, but don't understand how to get it.
curl -o filename http://www.website.com
curl -O http://www.website.com
The... (3 Replies)
Discussion started by: locoroco
3 Replies
LEARN ABOUT CENTOS
pam_issue
PAM_ISSUE(8) Linux-PAM Manual PAM_ISSUE(8)
NAME
pam_issue - PAM module to add issue file to user prompt
SYNOPSIS
pam_issue.so [noesc] [issue=issue-file-name]
DESCRIPTION
pam_issue is a PAM module to prepend an issue file to the username prompt. It also by default parses escape codes in the issue file similar
to some common getty's (using x format).
Recognized escapes:
d
current day
l
name of this tty
m
machine architecture (uname -m)
machine's network node hostname (uname -n)
o
domain name of this system
release number of operating system (uname -r)
current time
s
operating system name (uname -s)
u
number of users currently logged in
U
same as u except it is suffixed with "user" or "users" (eg. "1 user" or "10 users")
v
operating system version and build date (uname -v)
OPTIONS
noesc
Turns off escape code parsing.
issue=issue-file-name
The file to output if not using the default.
MODULE TYPES PROVIDED
Only the auth module type is provided.
RETURN VALUES
PAM_BUF_ERR
Memory buffer error.
PAM_IGNORE
The prompt was already changed.
PAM_SERVICE_ERR
A service module error occurred.
PAM_SUCCESS
The new prompt was set successfully.
EXAMPLES
Add the following line to /etc/pam.d/login to set the user specific issue at login:
auth optional pam_issue.so issue=/etc/issue
SEE ALSO
pam.conf(5), pam.d(5), pam(8)
AUTHOR
pam_issue was written by Ben Collins <bcollins@debian.org>.
Linux-PAM Manual 09/19/2013 PAM_ISSUE(8)