10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All!
Thanks for taking time out and helping.
My issue is, I have two files that have file names in it. Now, i need to go through each line of both the files and when the file names are different, i need to rename the file. Below is the example:
File1</
fil1ename1.txt
filename2,txt... (2 Replies)
Discussion started by: svks1985
2 Replies
2. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Is there any way to do a cat * where it shows the name of each file in the process? Similar to what more does below?
$ more ?.sql
::::::::::::::
1.sql
::::::::::::::
set linesize 200
select db_unique_name,
cast(
from_tz(
cast(... (5 Replies)
Discussion started by: newbie_01
5 Replies
4. UNIX for Dummies Questions & Answers
I have a folder that contains a number of files with file names as follows:
XX.YYYY..ZZZ.2014.001.000000
XX.YYYY..ZZZ.2014.001.000400
XX.YYYY..ZZZ.2014.001.000800
XX.YYYY..ZZZ.2014.001.001200
XX.YYYY..ZZZ.2014.001.001600
.....
XX.YYYY..ZZZ.2014.002.000000
XX.YYYY..ZZZ.2014.002.000400... (8 Replies)
Discussion started by: quakesrus
8 Replies
5. Shell Programming and Scripting
Hi everyone,
I'm new to the forums, as you can probably tell... I'm also pretty new to scripting and writing any type of code.
I needed to know exactly how I can grep for multiple strings, in files located in one directory, but I need each string to output to a separate file.
So I'd... (19 Replies)
Discussion started by: LDHB2012
19 Replies
6. UNIX Desktop Questions & Answers
I have a number of files in a directory named like this:
fooP1, fooN1, fooP2, fooN2 ... fooP(i), fooN(i).
I'd like to know how to combine each P and N pair into a single file, foo(i)
TIA
John Balwit (1 Reply)
Discussion started by: balwit
1 Replies
7. Shell Programming and Scripting
Hello!
I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Discussion started by: xqwzts
1 Replies
8. UNIX for Dummies Questions & Answers
Hi--
I'm trying to figure out how to use cat more wisely. I have the following command, which works, but I'd like to understand how to get it to work more clearly and efficiently.
cat 'my file.001' 'my file.002' 'my file.003' 'my file.004' 'my file.005' 'my file.006' 'my file.007' 'my... (6 Replies)
Discussion started by: rlinsurf
6 Replies
9. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
10. Shell Programming and Scripting
I am writing a script that is running a loop on one file to obtain records from another file.
Using egrep, I am finding matching records in file b, then outputing feilds of both into another file.
****************************
filea=this.txt
fileb=that.txt
cat $filea | while read line
do... (1 Reply)
Discussion started by: djsal
1 Replies