Search Results

Search: Posts Made By: marcozd
5,399
Posted By ahamed101
Try this #!/bin/bash echo " Please chose...
Try this

#!/bin/bash
echo " Please chose the header you want to add:
1. head1.txt
2. head2.txt
3. head3.txt
4. head4.txt"
read choice
sed '1,2d' body.txt >tmp && mv tmp body.txt
cat...
5,252
Posted By ctsgnb
By setting "Frame" as record separator , i must...
By setting "Frame" as record separator , i must get rid off the leading line "^14$", i must adjust the offset of record, this is why the NR-1 instead of NR

awk -F"\n" 'BEGIN {RS="Frame"...
5,252
Posted By Scrutinizer
Try: awk '/^[0-9]+$/{a=$1;p=0}...
Try:
awk '/^[0-9]+$/{a=$1;p=0} $1=="Frame"&&$2%m{print a;p=1}p' m=3 infilem=2,3,4 etc...
5,252
Posted By radoulov
To print the blocks 2, 4, 6 and so on: awk...
To print the blocks 2, 4, 6 and so on:

awk 'END {
if (!(rc % v) && rc != prc)
print r
}
NF == 1 {
if (!(rc % v)) {
print r; prc = rc
}
r = x; rc ++
}
{ r = r ? r...
3,209
Posted By Scrutinizer
awk '/\$END/{s=0}s{p=p RS $0}/\$HESS/{getline...
awk '/\$END/{s=0}s{p=p RS $0}/\$HESS/{getline p;s=1}END{print p}' infile
3,209
Posted By vgersh99
something to start with: nawk '/\$HESS/...
something to start with:

nawk '/\$HESS/ {arr="";f=1} f {arr=(arr)?arr ORS $0:$0} /\$END/{f=0} END {print arr}' job_input.dat
7,052
Posted By bartus11
It looks like $NAME variable is empty. Did you...
It looks like $NAME variable is empty. Did you pass variable value while executing script? Like #qsub x.sh -v NAME=job_name?
7,052
Posted By bartus11
Then it has to work. Try again this code: awk...
Then it has to work. Try again this code: awk '/\$VIB/{p=1}p;END{print "$END"}' job_name.rst Note, that there is no "^" in that command.
2,342
Posted By quirkasaurus
find /scratch/mzd/gamess-scratch -type f -name...
find /scratch/mzd/gamess-scratch -type f -name ${NAME:-safety_net}\* -exec /bin/rm {} \;



... that'll do it....
Showing results 1 to 9 of 9

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