Sponsored Content
Top Forums Shell Programming and Scripting How to print range of lines using sed when pattern has special character "[" Post 302418992 by nehashine on Thursday 6th of May 2010 02:44:32 AM
Old 05-06-2010
No, I cant use \[, \] as these values are stored in a variable in very early stages. Please give me another solution
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. UNIX for Dummies Questions & Answers

perl split funciton - special character "/"

HI, I have a directory structure. /abc/def/ghi/ I want to store it into array. So that if I do a pop function on that array I can easily go to previous directory. But how can i split and store it. @Directory = split(/\//,$DirectoryVarialbe) That doest works. Any other escape sequence... (5 Replies)
Discussion started by: deepakwins
5 Replies

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

5. Shell Programming and Scripting

Sed print range of lines between line number and pattern

Hi, I have a file as below This is the line one This is the line two <\XMLTAG> This is the line three This is the line four <\XMLTAG> Output of the SED command need to be as below. This is the line one This is the line two <\XMLTAG> Please do the need to needful to... (4 Replies)
Discussion started by: RMN
4 Replies

6. Shell Programming and Scripting

Unable to identify the special characters beyond the range of "[\x80-\xFF]"

I want to filter out the special character whose ascii value doesn't fall within the range "" . Example:� or Ć. So in that case is there any defined range which will filter out this characters. I can filter those which falls withing "" . Need to filter those special chracter which doesn't... (14 Replies)
Discussion started by: Abhijit Sen
14 Replies

7. Shell Programming and Scripting

sed random \n for "n" range of character occurrences

I'd like to put paragraph breaks \n\n randomly between 5 - 10 occurrences of the dot character (.), for an entire text file. How to do that? In other words, anywhere between every 5 -10 sentences, a new paragraph will generate. There are no other uses of the (.) except for sentence breaks in... (11 Replies)
Discussion started by: p1ne
11 Replies

8. Shell Programming and Scripting

Remove word after special character "/"

Hi There, I have one requirement to remove word after character "/". Input file is 2017-07-12|02|user1l|domain1/userl|0 2017-07-12|02|user2|domain1/user2|5 2017-07-12|02|user3|domain2/user3|0 2017-07-12|02|user4|domain1/user4|432 and require OP file is ... (2 Replies)
Discussion started by: anshu ranjan
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. UNIX for Beginners Questions & Answers

Remove a word that ends with special character "!"

Hi all. I want to use sed to remove a word that ends with "!" in the first page of a file. The word I want to remove is: "DNA!". I have search for an answer and nothing of what I found helped me. ~faizlo (2 Replies)
Discussion started by: faizlo
2 Replies
GPIOCTL(1)						    BSD General Commands Manual 						GPIOCTL(1)

NAME
gpioctl -- GPIO control utility SYNOPSIS
gpioctl -l [-f ctldev] [-v] gpioctl -t [-f ctldev] pin gpioctl -c [-f ctldev] pin flag [flag ...] gpioctl [-f ctldev] pin [0|1] DESCRIPTION
The gpioctl utility could be used to manage GPIO pins from userland and list available pins. The options are as follows: -c pin flag [flag ...] Configure pin by setting provided flags. The following flags are currently defined: IN Input pin OUT Output pin OD Open drain pin PP Push pull pin TS Tristate pin PU Pull-up pin PD Pull-down pin II Inverted input pin IO Inverted output pin -f ctldev GPIO controller device to use If not specified, defaults to /dev/gpioc0 -l list available pins -t pin toggle value of provided pin number -v be verbose: for each listed pin print current configuration EXAMPLES
o List pins available on GPIO controller defined by device /dev/gpioc0 gpioctl -f /dev/gpioc0 -l o Set the value of pin 12 to 1 gpioctl -f /dev/gpioc0 12 1 o Configure pin 12 to be input pin gpioctl -f /dev/gpioc0 -c 12 IN SEE ALSO
gpio(4), gpioiic(4), gpioled(4) HISTORY
The gpioctl utility appeared in FreeBSD 9.0. AUTHORS
The gpioctl utility and this manual page were written by Oleksandr Tymoshenko <gonzo@freebsd.org>. BSD
November 7, 2013 BSD
All times are GMT -4. The time now is 01:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy