Hi Unix gurus
This is my first post here. I have a file which looks like this:
string1,string2
,string3
,string4
...
...
I need to append all words below first line to the first line, ie
string1,string2,string3,string4,...
Bear in mind that it is not known how many lines follow... (11 Replies)
Hi all,
I have output files that are all text files with various different extensions.
So, if I submit the input file "job_name.inp", when it finishes I get an output file "job_name.dat". A typical input file looks something like this:
$CONTRL SCFTYP=RHF RUNTYP=ENERGY MAXIT=199 MULT=1... (4 Replies)
After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh.
Now I've gotten the sed... (2 Replies)
I am writing a code to append some numbers in the beginning of each line in all the files present in a directory. The number of files are really huge. The files are numbered as 1.sco, 2.sco, 4.sco (Note: 3.sco is missing).
The files currently look like this:
1.sco
2 3
5 6
6 7My task is to... (4 Replies)
I have 2 files that I am working with
$ cat file1
server1
server3
server5
server6
server8
$ cat file2
server1;Solaris;
server2; SLES;
server3;Linux;
server4; Solaris;
server5;SLES;
server6;SLES;
server7;Solaris;
server8;Linux; (1 Reply)
Hi Forum,
I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result.
cd $dir... (8 Replies)
Hi,
I have a File, which have multiple rows.
Like below
123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
I want to search a line which contains PB MO Approver and append... (2 Replies)
hi,
i need a help in the script , need to append a string at the end of each line of a files , and append the files into a single file vertically.
eg
file1 has the following columns
abc,def,aaa
aaa,aa,aaa
files 2 has the following rows and columns
abc,def,aaa
aaa,aa,aaa
i... (3 Replies)
Task: Find keywords in each line, and append at the end of line; if not found in the line, do nothing.
the code is wrong. how to make it work. thanks a lot.
cat keywords.txt | while read line; do
awk -F"|" '{if (/$line/) {print $0"$line , ";} else print;}' outfile.txt > tmp
... (9 Replies)
Hi Experts
Need help...
I am looking for a Unix script to append pipe | at the end of all the rows (except header and trailer)in all the files placed under the directory /interfaces/Temp
e.g.
Header
row1
row2
row3
Trailer
The script should read all the files under... (3 Replies)
Discussion started by: phani333
3 Replies
LEARN ABOUT OSF1
lndir
lndir(1X)lndir(1X)NAME
lndir - create a shadow directory of symbolic links to another directory tree
SYNOPSIS
lndir fromdir [todir]
DESCRIPTION
lndir makes a shadow copy todir of a directory tree fromdir, except that the shadow is not populated with real files but instead with sym-
bolic links pointing at the real files in the fromdir directory tree. This is usually useful for maintaining source code for different
machine architectures. You create a shadow directory containing links to the real source which you will have usually NFS mounted from a
machine of a different architecture, and then recompile it. The object files will be in the shadow directory, while the source files in
the shadow directory are just symlinks to the real files.
This has the advantage that if you update the source, you need not propagate the change to the other architectures by hand, since all
source in shadow directories are symlinks to the real thing: just cd to the shadow directory and recompile.
The todir argument is optional and defaults to the current directory. The fromdir argument may be relative (e.g., ../src) and is relative
to todir (not the current directory).
Note that RCS, SCCS, and CVS.adm directories are not shadowed.
Note also that if you add files, you must run lndir again. Deleting files is difficult because the symlinks will point to places that no
longer exist.
BUGS
The patch routine needs to be able to change the files. You should never run patch from a shadow directory.
Use a command like the following to clear out all files before you can relink (if the fromdir has been moved, for instance):
find todir -type l -print | xargs rm
The following command will find all files that are not directories:
find . ! -type d -print
lndir(1X)