10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have an issue modifying a file. Below is the content of the file.
File name - a.txt
SELECT LISTAGG(SCORE), LISTAGG(VB),
LISTAGG(SCORE*12 + 3),
LISTAGG(DOB)
from T_CONCAT ;
SELECT LISTAGG(SCORE),
LISTAGG(VB),
LISTAGG(SCORE*100 + 3),
from... (1 Reply)
Discussion started by: Mannu2525
1 Replies
2. Shell Programming and Scripting
i have to append a text file
grep for a word, if found, put comment in starting of the line.
here is an example
cat test.sh
bin/ksh
Hello World
Test Message
:wq!
search for "bin" word in test.sh file if found comment it out at starting of the line:
Output as follows:
#bin/ksh... (5 Replies)
Discussion started by: raghur77
5 Replies
3. Shell Programming and Scripting
I have some html with hrefs that contain local links to pdf filenames. These filenames should have standardised names, i.e. there should be a label prior to the ".pdf" filename suffix. There can be many of these links on a single line of text and some may already have the label. For example
... (13 Replies)
Discussion started by: adb
13 Replies
4. UNIX for Dummies Questions & Answers
Hi Folks,
I wanted to know if i can use RegEx in a for-loop of a shell script.
Here's a scenario, I have a set of files say x1, x2, x3..x9 in a directory(obviously with files other than this pattern). I want to append a line of text to all files that follow pattern x. Can someone help me out? I... (4 Replies)
Discussion started by: prithvirao17
4 Replies
5. Shell Programming and Scripting
Hi
I am trying to search for a particular occurrence of a string in a file, and if found, append another string to the end of that line.
Here is my file contents:
column1 userlist default nowrite=3 output=4
column2 access default nowrite=3
Here is the code:
A="user=1... (1 Reply)
Discussion started by: bludhemn
1 Replies
6. Shell Programming and Scripting
Hi,
I have a huge text file that contains contents like below.
echo 2VPMUM1CMP01_2011-05-10_18_CPU_Stats_1.txt
awk -F, '{sub ("%","",$8);sum+=100-$8;if (100-$8>max){max=100-$8}}END{printf "max=%.1f%\navg=%.1f%\n",max,sum/NR}'
echo 2VPMUM1CMP01_2011-05-11_10_CPU_Stats_1.txt
awk -F,... (2 Replies)
Discussion started by: SunilB2011
2 Replies
7. Shell Programming and Scripting
hi,
I've a file with some text in it, i need to append few strings in the beginning and end of each row.
--in file
richie
matt
..
--out file
hi, 'richie' is here
hi, 'matt' is here
...
I tried with awk command, but it fails because of '
Thanks (2 Replies)
Discussion started by: dvah
2 Replies
8. Shell Programming and Scripting
I have a text like this ... i need append the text whihc is after 'csb' into the end of the line
input
-----
sdir;csp os_lib-0.5.24;bdir;cbpdob ---enable-useosstl
sdir;csp oc_lib-0.10.4;bdir;cbpdob ---enable-useosstl
output
sdir;csp os_lib-0.5.24;bdir;cbpdob ---enable-useosstl... (6 Replies)
Discussion started by: girija
6 Replies
9. Shell Programming and Scripting
I have a command stream that will parse down an ftp DIR listing of a remote directory and return the name of the newest file that I am interested in. The command is
sed -e '/^d/d' sppay.listing |sed -n -e '/SPPAY/p'|sort -r -k 43M,45 -k 47,48 -k 50,54|sed -n -e '1p'|cut -c 56-99
and what it... (2 Replies)
Discussion started by: beilstwh
2 Replies
10. Shell Programming and Scripting
I'm creating a script that counts the number of users currently online, then records that in a file called "log.txt" along with the time. Everytime the script is ran, the script appends the "log.txt"
this is what I have:
who|wc|cut -c6,7>>log.txt
date|cut -c12-24>>log.txt
After running... (5 Replies)
Discussion started by: 801238429
5 Replies