Search Results

Search: Posts Made By: Error404
888
Posted By clx
One way awk '/@<TRIPOS>BOND/ {getline;if...
One way


awk '/@<TRIPOS>BOND/ {getline;if ($0 ~ /@<TRIPOS>SUBSTRUCTURE/) {print FILENAME;exit}}' *.mol2


All it does is, checking for @<TRIPOS>SUBSTRUCTURE just after @<TRIPOS>BOND. If it...
1,855
Posted By zaxxon
Depending on your shell, you could do this also...
Depending on your shell, you could do this also with Parameter Substitution (http://tldp.org/LDP/abs/html/parameter-substitution.html).
What have you tried so far?
1,855
Posted By RudiC
Try for FILE in *; do echo mv $FILE ${FILE%%.*};...
Try for FILE in *; do echo mv $FILE ${FILE%%.*}; done
Should this exceed your LINE_MAX, try
ls * | while read FILE; do echo mv $FILE ${FILE%%.*}; done
1,514
Posted By Corona688
Ah, but how do you know it's in column 6, not...
Ah, but how do you know it's in column 6, not column 5?

Also, why bother assigning a variable? You can do it all in one statement with gsub(/:/,"",$6)
1,514
Posted By Corona688
awk '{gsub(/:/,""); print $5$6}'
awk '{gsub(/:/,""); print $5$6}'
3,339
Posted By shamrock
Provide the "-n1" option to xargs so that it...
Provide the "-n1" option to xargs so that it processes just one file at a time...
grep 'string' | awk '{print $2$3}' | xargs -n1 -I {} cp {} /dir1/dir2/dir3
And where is grep's input coming from...
3,339
Posted By PikK45
ON doing this grep 'string' | awk '{print $2$3}' ...
ON doing this grep 'string' | awk '{print $2$3}' it is returning the values like this.

make sure what are the 2nd and the 3rd fields and proceed!!
4,290
Posted By drl
Hi. You may be interested in combine: ...
Hi.

You may be interested in combine:
combine - combine sets of lines from two files using boolean operations

SYNOPSIS
combine file1 and file2

combine file1 not file2...
4,290
Posted By Don Cragun
When I thought you always wanted to work on three...
When I thought you always wanted to work on three directories, I started working on the following script:
#!/bin/ksh
IAm="${0##*/}"
if [ $# -ne 3 ]
then printf "Usage: %s dir1 dir2 dir3\n"...
1,271
Posted By Yoda
tr "/" "\t" translates all the forward slash / to...
tr "/" "\t" translates all the forward slash / to horizontal tab \t

For further reference on tr command check the manual here (https://www.unix.com/man-page/linux/1/tr/)
1,271
Posted By joeyg
Probably other solutions...
Now, this solution does eliminate the / characters...

$ cat sample40.txt
1 ethanol
2 methanol
3 methanol/ethanol
4 ethanol/methanol
5 ethanol/DMF
6 ethyl...
3,957
Posted By hergp
Check your input file for non printable...
Check your input file for non printable characters, especially at the beginning around the header line. You can use


od -c inputfile | head

for this.
3,957
Posted By bmk
See my output... V12 V13 V14 V15 V16 100 200...
See my output...
V12 V13 V14 V15 V16
100 200 300 NA 500
220 NA 100 500 600
700 NA 900 100 200
1,303
Posted By Yoda
Try this:- awk ' { if($2 ~ /^ *$/ ) print $1; }...
Try this:-
awk ' { if($2 ~ /^ *$/ ) print $1; } ' input_file > new_file
1,223
Posted By pamu
Try find -name '*-1.mol' -exec mv {}...
Try


find -name '*-1.mol' -exec mv {} /destination_path/ \;
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 03:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy