9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Platform : Oracle Linux 6.8
Shell : bash
I have a file which has lines like below. These are SELECT queries (SQL)
In each line, I want the word just after FROM keyword to be copied and printed on the top along with the word PROMPT.
The words after FROM clause below are table names. So, they... (6 Replies)
Discussion started by: John K
6 Replies
2. Shell Programming and Scripting
Hello,
I have text files to append and am able to do with cat.
cat file1 file2 >file3
and file3 works fine in UNIX (checked with vi and it looks fine) but when i open the same file in windows I see 2nd file appended as a single-line. In other words, all the lines of 2nd file appended to... (2 Replies)
Discussion started by: magnus29
2 Replies
3. Shell Programming and Scripting
I am trying to count number of record in a file and then append a trailer to that file.
Trailer should e in the format as below
T| <count of records>
count of records ---> this count should be one less than the actual count obtained, as the file will have a header.
I have drafted a... (3 Replies)
Discussion started by: siteregsam
3 Replies
4. UNIX for Dummies Questions & Answers
Hey all
I am trying to append a file called datebook.txt. I want to append the end of each line containing the name Fred with three ***. I believe I need to make the * loose its meta character meaning in addition to using the append command. I have tried several variations of this command and I... (3 Replies)
Discussion started by: citizencro
3 Replies
5. UNIX for Dummies Questions & Answers
actually, i have to grep the value of cpu usage from six differrent servers and it has to generated in a single report( in a single text or excel file). i have used the below command for grepping the value.
top -n 1 > arun.txt
cat arun.txt | grep 'init' | cut -c 49-53 > output1.csv
like... (2 Replies)
Discussion started by: arunmanas
2 Replies
6. Shell Programming and Scripting
Hi,
Want to append the text to a new file,
echo "set `sqlplus -S abc/xyz123@localdb<<EOS" >> chk_test_append.sh
echo "EOS`" >> chk_test_append.shbut getting the below error :
what wrong is written ?
With Regards (4 Replies)
Discussion started by: milink
4 Replies
7. UNIX for Dummies Questions & Answers
Dear All,
I have two files
One is script file in which I am writing commands to append a text in a normal file.
I want to insert the text on top of the file.
I dont want to use sed and awk commands nor temp file.
is it possible? (3 Replies)
Discussion started by: anjali
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I was wondering if there was a way to append something to filenames based on a wildcard. For example, if I have the following files in a directory:
blah1
blah2
blah3
blah4
blah5
I want to rename these all to:
blah1.txt
blah2.txt
blah3.txt
blah4.txt
blah5.txt
Is there a... (4 Replies)
Discussion started by: Djaunl
4 Replies
9. Shell Programming and Scripting
hello,
I am trying to append\insert the text that exists in file A into file B.
for instance:
File A contains: abcdef
File B contains: ghijklm
can i insert into file A the content in file B without damaging\deleting the input into file A?
is there a command in shell that enables such... (1 Reply)
Discussion started by: danland
1 Replies