10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the string:
XXXX.YYYY_ZZZ.20180724.01.txt
I need to get rid of .txt and get full four parts
XXXX.YYYY_ZZZ.20180724.01
I did:
CTL=`echo XXXX.YYYY_ZZZ.20180724.01.txt | rev | cut -d"." -f4 | rev`
But got only YYYY_ZZZ
What should I do to get all four parts of that... (4 Replies)
Discussion started by: digioleg54
4 Replies
2. Shell Programming and Scripting
Dear all,
I would like to use SQL's log file to extract information from it.
This file can include four different types of instruction with the number of lines involved for each of them:
-> (1) "INSERT" instruction with the number of lines inserted
-> (2) "UPDATE" instruction with the... (4 Replies)
Discussion started by: dae
4 Replies
3. Shell Programming and Scripting
Hi all:
I have a 5-column tab-separated file.
The only thing that I want to do with it is to split it.
However, I want to split it with a 80/20 proportion -- randomized, if possible.
I know that something like :
awk '{print $0 ""> "file" NR}' RS='' input-file
will work, but it only... (6 Replies)
Discussion started by: owwow14
6 Replies
4. Shell Programming and Scripting
I have number in file which contains date and serial number:
2013101000.
The last two digits are serial number (00). So maximum of serial number is 100.
After reaching 100 it becomes 00 with incrementing 10 which is day with max 31.
after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies
5. Shell Programming and Scripting
Hello All,
I have a file like this
APPLY
( 'INSERT INTO brdcst_media_cntnt (
cntnt_id
,brdcst_media_cntnt_cd
,cntnt_prvdr_cd
,data_src_type_cd
,cntnt_titl_nm
,cntnt_desc
,batch_dt
,batch_id
) VALUES
(
:cntnt_id (3 Replies)
Discussion started by: nnani
3 Replies
6. Shell Programming and Scripting
Hello All,
I have a file like this
Define schema flat_file_schema
(
a varchar(20)
,b varchar(30)
,c varchar(40)
);
(Insert into table (
a
,b
,c
) values
(
1
,2
,3
); (4 Replies)
Discussion started by: nnani
4 Replies
7. Shell Programming and Scripting
I understand the individual pieces of the following (with one exception ..), but how does it all work as one?
find ${HOME}/reports/ -name surveyresult*.txt -exec ls -1 {} \; | /usr/xpg4/bin/grep -E \
"${HOME}/reports/surveyresult{14,14}.txt" | sort > ${ResultsFileList}
Find all files like... (1 Reply)
Discussion started by: jdorn001
1 Replies
8. Shell Programming and Scripting
I have a logfile from which i need to extract certain pattern based on the time but the problem here is the time is not same for all days.
Input file:
Mon 12:34:56 abvjingjgg
Mon 12:34:57 ofjhjgjhgh
.
.
.
Mon 22:30:00 kkfng
.
.
.
Mon 23:12:23 kjgsdafhkljf
.
.
.
Tue 01:04:54... (8 Replies)
Discussion started by: gpk_newbie
8 Replies
9. Shell Programming and Scripting
Hello, I'm trying to retreive certain bits of info from a file.
the file contains a list like this
info1:info2:info3:info4
info1:info2:info3:info4
info1:info2:info3:info4
info1:info2:info3:info4
how do i pick out only info2 or only info3 without the others?
Thanks (11 Replies)
Discussion started by: bebop1111116
11 Replies
10. UNIX for Dummies Questions & Answers
Every time we build an executable the date and time are put into the file, I need to run checksum on just the working lines.(IE, no header files)
Is this even possible, if so how would I go about it?
I am using a HP-UX server any help you can give me will be greatly appreciated.
Thanks (6 Replies)
Discussion started by: crazykelso
6 Replies