From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: henman <dhenman@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re:
Date: Fri, 13 Oct 2023 00:22:28 +0200 [thread overview]
Message-ID: <CAP+y1xC33kGMAaqN=BxY7y92Hk+ZujGAu=fRDRUwjpmHxWKVCw@mail.gmail.com> (raw)
In-Reply-To: <CAC2FHtSqa02G85+ty_d2x+M3EufNbsXjrsg1TkeU3ia9zf9U3g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Il giorno gio 12 ott 2023 alle 20:40 henman <dhenman@gmail.com> ha scritto:
> Subject: How to compare for control codes in a string
> X-Mailer: MH-E 8.6+git; GNU Mailutils 3.16; Emacs 29.1
> --------
>
>
> I want to see if the 1st character in a string is a formfeed and then
> remove it.
>
> I use the following script to check it
>
> if [[ $line[1] == '\f' ]] # Check if the 1st character is a formfeed
> then tmpline=${line[@]:1} # strip the ^f off
> fi
>
hello, this should work:
if [[ $line[1] == $'\f' ]]
cheers
[-- Attachment #2: Type: text/html, Size: 1703 bytes --]
prev parent reply other threads:[~2023-10-12 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 18:39 henman
2023-10-12 18:51 ` How to compare for control codes in a string Bart Schaefer
2023-10-12 22:22 ` Pier Paolo Grassi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP+y1xC33kGMAaqN=BxY7y92Hk+ZujGAu=fRDRUwjpmHxWKVCw@mail.gmail.com' \
--to=pierpaolog@gmail.com \
--cc=dhenman@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).