Now I want to have something like this stored in a file
As one may notice the 0. value occurs multiple times. I need to remove the entry 0. except on the first occurance which is in the first line
The code below actually does that.
However if I have only one file, the script does not work. Also I want to change the file naming system to
which means that if the log files are a continuation of runs, the first run is tagged with -run1- as well. Of course, if only one run is done the lof file will still be
npt02-z30-sr65-rgdt0p50-dc0p004-16x12drw.log, i.e. without the -run1- tag.
I would also need to run the script on such a file and create a file with the parameters of interest.
The csh code is shown below, but I am getting confused how to change it so that I will pass multiple files all having a -run- tag. The code below ignored the -run- tag as currently the first run never has the -run1- tag.
I have a dataset with coordinates of certain points with their names.
file1:
AAA 5 7
BBB 7 2
CCC 4 4
DDD 4 4
EEE 8 9
FFF 9 9
GGG 4 9
HHH 32 1
III 7 6
JJJ 12 4
KKK 12 3
MMM 15 3The letters represent names of points. In file1 they are unique.
I also have file2 with a dataset with... (2 Replies)
Hi there, I‘m a newbie in linux (ubuntu) working with several files, some of them containing hundred thousands of lines. I started to extract information out of 2 files, combining them by 1 column: I need a Vlookup-like command that reads sampleID (column 2)(line 2,..line by line) in file 1, looks... (1 Reply)
hi everyone,
im stuck in here with shell :) can you help me??
i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ... and i want to read each one of them and search for some information and if i found the right one i save in new file with new... (6 Replies)
I am using the below script to remove the rows which contains null values in the 3rd column.My requirement here is want to get the filenames which row is removed .please help me.
#!/usr/bin/sh
Scripts=/ushhquest/data001/Scripts
cd /ushhquest/data011/TgtFiles/MonthlyData
ls CUSTADDR*.txt >... (4 Replies)
I need to copy a list of files in directory and only files with content DUMMY_B should be copy over to a new directory. How can i do that ? Thanks a lot. (2 Replies)
Hi,
I am looking for an AWK or grep script (join will not work here since the data is not sorted) to combine two Excel files that look lke this:
Infile1:
Georgia Atlanta 1234 1234
Georgia Marrieta 2134 2134
Georgia Scottdale 3414 3414
Georgia Clarkston 2321 2321
Infile2:
... (6 Replies)
Hi,
I want to compare two fields in two different files and add a corresponding field in a third output file. Something similar to vlookup.
Please see the attached input files and the example output file.
I want to compare each entry in column 1 in file1 with column 5 in file2. If both the... (6 Replies)
I would like to know how to take information from a filename and place it into the text of the same file. Let's say I have a file called height_2_width_1.txt containing data that is related to a height of 2 and a width of 1, and the text originally looks like this:
where these two columns... (13 Replies)
Hi all,
I want to get only hidden files(which are start with '.' or '..') information in a current directory. I tried the below command,
$ find . -name "^." -exec ls -la '{}' \;
but it's not working. Can anyone give me your outputs.
Thanks in advance,
Raghu. (5 Replies)
I need to save information relating to certain files that are projected to deleted.
I am using
find $defPath/archive/sub/subchild -type f -mtime +365 > LOGFILE
cat LOGFILE|
while read line
do
ls -l $line | cut -d" " -f 10-15
done
But, since cut is cutting columns on space (single... (3 Replies)