10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
HI All,
I want to know if it is possible to print the same message but into 2 different files in the same command?
Something like
.
..
...
echo "Text" >> file1 && file2
this is because i creating a script which i use a log but i don't want to duplicate lines of command just to... (5 Replies)
Discussion started by: lordseiya
5 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I've a requirement to modify an existing line which is common to multiple files. I need to replace that existing line with a new line. I've almost 900 ksh files to edit in the similar fashion in the same directory.
Example:
Existing Line: . $HOME/.eff.env (notice the "." at the... (3 Replies)
Discussion started by: kaleem.adil
3 Replies
4. Shell Programming and Scripting
I need to insert <filename + comma> into each line of multiple files.
Any idea how to script that?
Regards,
Manu (5 Replies)
Discussion started by: linux.yahoo
5 Replies
5. Shell Programming and Scripting
Hi guys, I'm try making to script for eliminate files rlogins.
path1='/home/*'
for i in `cat /etc/passwd |awk -F: '{print $6}'`; do
if test "$i" = "$path1"; then
echo $i
cd $i
if ; then
echo "$i/.rhosts detectado"|mail -s "rhosts" root
... (14 Replies)
Discussion started by: nena_redbalon
14 Replies
6. Shell Programming and Scripting
Hi,
I need to eliminate each second void line in a text file.
novus
MILLENNIO
ineo
frater
in
episcopatus
,
presbyter
et
diacon|diaconus
, (1 Reply)
Discussion started by: mjomba
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the last line of each file?
This code doesn't work, it only prints the last line of the last file:BEGIN... (5 Replies)
Discussion started by: Liverpaul09
5 Replies
8. Shell Programming and Scripting
Hi ,
I want to rename multiple files with their first line bar the first character + the extension .qual. For the example below the filename should read
7180000000987.qual. I have trawled through different threads for 2 days and I don't seem to find anything I can adopt for this task :confused:
... (7 Replies)
Discussion started by: Bruno
7 Replies
9. Shell Programming and Scripting
Dear All,
can anybody help me out in generating a command that can be used to view the last line of multiples files.
e.g:
file 1 contains 100 records
file 2 contains 200 records
file 3 contails 300 records
now i need a command that can be used to display the last line of each... (7 Replies)
Discussion started by: jojo123
7 Replies
10. Shell Programming and Scripting
Hi
I am very new to shell scripting and have written a script (below).
However the directory I am searching will contain a file with a .trn extension each day which I want to eliminate.
Each day the file extension overnight will change to trx, if this fails I want to know.
Basically what I... (2 Replies)
Discussion started by: richM
2 Replies