The following AWK script convert a FastQ file to a FastA file:
awk 'NR % 4 == 1 || NR % 4 == 2{sub("@",">",$1); print $1}' input.fastq > output.fasta
The FastQ formatted file input.fastq will remain unchanged. The resulting FastA formatted file is stored a output.fasta in this example. Both filenames are set by you.