Hi all,
I'm newbi in scripting.
could someone tell how to delete the ^M at the end of the linie with an awk command.
many thanks in advance. (2 Replies)
Any clues on how to parse a line returned from an ls command that allows for the filename to be fully passed even if it includes spaces? What I got close with is:
ls -ltra | awk '{print $1 "|" $3 "|" $4 "|" $5 "|" $6 "|" $7 "|" $8 "|" $9 $10 $11 $12 ... (etc)}'
However this clears the spaces in... (6 Replies)
Hi to all! I 'm new in unix programing so... may be I decided a wrong tool to solve the problem but anyway... all road goes to rome jajaja.
My question is: There is any way to print date at the END clause of an AWK script. I mean, I'm writing a tool with AWK and the results are redirected to a... (4 Replies)
Hello.
I'm using a file to "grep" in a 2nd one (with awk)
cat file1
2 first user
9 second user
1 third user (with a space after user)
I want to get the line except the 1st field so I do :
field=$(gawk '{$1 =""; print $0}' file | sed 's/^ //')
It works but it deletes... (5 Replies)
I have a textfile which I am parsing with awk. The lines do not have the same number of fields, so sometimes $3 is the last field, sometimes not.
When I do a 'printf("%s, %s\n", $2, $3)', if $3 is the last field in the line, when I cat the file the output looks something like this:... (3 Replies)
I'm new to awk, trying to understand the basics.
I'm trying to reset the counter everytime the program gets a new file to check.
I figured in the BEGIN part it would work, but it doesn't.
#!/bin/awk -f
BEGIN {counter=0}
{
sum=0
for ( i=1; i<=NF;... (1 Reply)
Hello,
I have another problem with my script. Please accept my apologies, but I am really nooby in sh scripts. I am writing it for first time.
My script:
returned=`tail -50 SapLogs.log | grep -i "Error"`
echo $returned
if ; then
echo "There is no errors in the logs"
fi
And after... (10 Replies)
Hi,
I tried to use a code to awk until the end of file. I not sure what is the syntax so my last paragraph is \n
`var=$(awk '/\n/ {P=0} /Policy Change/ {P=1} P' (2 Replies)
Discussion started by: alvinoo
2 Replies
LEARN ABOUT DEBIAN
libspectrum
libspectrum(3) Emulators libspectrum(3)NAME
libspectrum - Sinclair ZX Spectrum support library
DESCRIPTION
libspectrum is a library for reading and writing some of the file formats used by emulators of the Sinclair ZX Spectrum. It also contains
routines providing information about the various Spectrum clones which were available.
The file formats currently supported by libspectrum are:
o Snapshots: .z80, .szx, .sna (all read/write), .zxs, .sp., .snp and +D snapshots (read only).
o Tape images: .tzx, .tap, .spc, .sta, .ltp (read/write) and Warajevo .tap, Z80Em and CSW version 1 (read only).
o Input recordings: .rzx (read/write).
o Disk images: .dsk (both plain and extended), .fdi, .sad, .scl, .td0, .trd and .udi (identification only).
o Timex cartridges: .dck (read only).
o IDE hard disk images: .hdf (read/write).
o Microdrive cartridge images: .mdr (read/write).
Additionally, any files compressed with bzip2(3) or gzip(3) can be read and will be transparently decompressed.
Full documentation for libspectrum is provided in `libspectrum.txt'.
SEE ALSO bzip2(3), fuse(1), fuse-utils(1), gzip(3)
The comp.sys.sinclair Spectrum FAQ, at
http://www.worldofspectrum.org/faq/index.html.
AUTHOR
Philip Kendall (philip-fuse@shadowmagic.org.uk)
Version 1.0.0 16th December, 2010 libspectrum(3)