10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, input data format:
echo ' <APPLICATION="APPLSG" SUB_APPLICATION="DLY" JOBNAME="DPL_BN_RE_CCMS_SA" CMDLINE="run_job.ksh %%PARAM1 %%PARAM2" TASKTYPE="Command" />'
expected format:
"APPLSG", "DLY", "DPL_BN_RE_CCMS_SA", "run_job.ksh %%PARAM1 %%PARAM2"
my command:
echo ' ... (2 Replies)
Discussion started by: JSKOBS
2 Replies
2. Shell Programming and Scripting
Unix File is pipe delimited with 17 fields. We may get extra pipes in data also.
We may get \n char (1 or more \n in one field or multi fileds) in data in any field.
Need to replace \n true ( line separator) with 'space and bell char space' chars (' \a ') Not data \n.
Input:... (1 Reply)
Discussion started by: rajeshkumare
1 Replies
3. UNIX for Beginners Questions & Answers
Hi,
I want to extract part of filename, for eg:
File="010020004_S-TOR-Sort-CASAP_20170519_121504_0007.TXT"
here i need first 5 words of file i.e.
FilePart="$(echo "${File%"${File#******}"}")"
Echo $FilePart
010020004_S-TOR-Sort-CASAP
But what if i get filename like below:
... (3 Replies)
Discussion started by: gnnsprapa
3 Replies
4. UNIX for Dummies Questions & Answers
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies
5. Shell Programming and Scripting
The following code removes new line with in double quotes
I am replacing newline character with in double quotes with 123.
intermediatenewline_remover () {
typeset Infile=$1
nawk -F"," '{ record = record $0
if ( gsub( /"/, "&", record ) % 2 )
{
record = record "123"
... (3 Replies)
Discussion started by: pinnacle
3 Replies
6. Shell Programming and Scripting
Hi,
We have a file with a unit seperator as the delimeter.
Here are the Sample lines from the file:
ASIA/PACIFICHong KongFX2007071080900
ASIA/PACIFICHong KongFX2007071080900/ 800129HK
This delimeter has the ascii value of \037.
I have to... (4 Replies)
Discussion started by: sviswana
4 Replies
7. Shell Programming and Scripting
Hi Please help me out with this problem:
I want to have a script that would change the nth field seperator in a line into something else.
like
a,d,4,2,97,8,9
into
a,d,4,2,97/8/9
Thanks (2 Replies)
Discussion started by: onthetopo
2 Replies
8. UNIX for Dummies Questions & Answers
I need to use | as a seperator in unix join command. i tried changing seperator using -t option but iit is not working. can u please help. (5 Replies)
Discussion started by: firvin
5 Replies
9. Shell Programming and Scripting
I am trying to create a new CSV file from an existing CSV file whose content is as follows:
"1","Tom,Garry","111"
"2","Tom,Garry","222"
when i use Cat file | cut -d',' -f1,3 or awk to have only the 1st and 3rd column in my new CSV file, instead of creating a file content as
"1","111"... (6 Replies)
Discussion started by: premar
6 Replies
10. Shell Programming and Scripting
I wrote a script on HPUX 11.11 to turn a Decimal subnet mask (255.255.254.0) to hex 0xfffffe00 (subset of a bigger script). It works great on the HPUX systems but on the freebsd box the awk is not seperating the fields properly. I tried to google for a solution and seaching these forums i am just... (3 Replies)
Discussion started by: insania
3 Replies