Sponsored Content
Top Forums Shell Programming and Scripting Help to find string and return following characters from list of files Post 302480976 by citaylor on Thursday 16th of December 2010 09:40:58 AM
Old 12-16-2010
Code:
find . -name "example.xml" -exec grep Version {} /dev/null \;

or
Code:
find . -name "example.xml" -print | xargs grep Version

This User Gave Thanks to citaylor For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with find and replace w/string containing special characters

Can I get some help on this please, I have looked at the many post with similar questions and have tried the solutions and they are not working for my scenario which is: I have a text file (myfile) that contains b_log=$g_log/FILENAME.log echo "Begin processing file FILENAME " >> $b_log ... (4 Replies)
Discussion started by: CAGIRL
4 Replies

2. Shell Programming and Scripting

Script to find string and return next 2 lines

I am trying to create a script to search for a string within a file, and if found, return the next two lines. Example file:- msj mh query return this 1 return this 2 mjk mhj query return this 3 return this 4 So the script would identify the string "query" and then return the lines... (10 Replies)
Discussion started by: daveaasmith
10 Replies

3. UNIX for Dummies Questions & Answers

Find in Files (special characters)

Well, I've searched the forum, but couldn't find an option, that would help me. I'm really a dummie in unix, so here it goes. I've got like 50k files in a single catalogue. One of them contains a string: Including the box/square brackets. I tried to find it manually, and use some search... (2 Replies)
Discussion started by: kalik
2 Replies

4. UNIX for Dummies Questions & Answers

remove characters from list of files

done some homework on this-- after i remove up to and including the ) i want to take newfile.txt and use that list to remove the files from a file in my the directory pwd i have a input.txt file cat input,txt 1)mary.jpg 12)john.jpg 100)frankkfkdf .jpg i want to remove the characters in the... (1 Reply)
Discussion started by: plener
1 Replies

5. Shell Programming and Scripting

Return error if - or certain characters are present in a list of strings

I have a list of strings, for example: set strLst = "file1 file2 file3 file4" I want to log an error if some of the fields happen to begin with -, or have characters like ; : ' , ? ] { = Which means for example setting set ierr = 1 (2 Replies)
Discussion started by: kristinu
2 Replies

6. Shell Programming and Scripting

Help with sed command - find a string between two characters

Hi, I have a xml file (Config.xml) <Header name="" TDate="" PDate=""> <Config> {"config" { "Nation" "Pri:|Sec:"}} </Config> </Header> Now I wanted to printed all the strings between "". I tried the following cat Config.xml | sed -n 's/.*\.*//p' ... (8 Replies)
Discussion started by: vivek_damodaran
8 Replies

7. Shell Programming and Scripting

Grep string in files and list file names that contain the string

Hi, I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat. My OS is: SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies

8. Shell Programming and Scripting

Find a string and then return the next 20 characters in multiple files

Hello all, I have a directory with 2000+ files. I need to look in each file for an invoice number. To identify this, i can search for the string 'BIG' and then retrieve the next 30 characters. I was thinking awk for this, but not sure how to do it. Each file contains one long string and in... (8 Replies)
Discussion started by: jdinero
8 Replies

9. Shell Programming and Scripting

Find/replace alpha characters in string

Hi, I would like to find a 3-letter character series in a string/variable and replace it with x's. An example set of strings is: 563MS333_101_afp_400-100_screening 563MS333_104-525_rjk_525_screening 563MS333_110_dlj_500-100_w24 563MS333_888-100_mmm_424_screening The only constants... (5 Replies)
Discussion started by: goodbenito
5 Replies

10. Shell Programming and Scripting

Shell Scripting | Return list of unique characters in files

Hi, I am trying to script the below, but I am not very good at it :( Your help would be greatly appreciated. 1. read all files in the directory in strings strings *.* 2. in each file, for each line that contains "ABCD", store characters located at position 521 and 522 of this line... (9 Replies)
Discussion started by: clippertm
9 Replies
SPLASHY_UPDATE(1)					 Splashy POSIX boot splash system					 SPLASHY_UPDATE(1)

NAME
Splashy - a user-mode, POSIX and LSB compliant, boot splashing system for UNIX. SYNOPSIS
splashy_update "<text>" DESCRIPTION
Splashy displays an image and a progress bar at boot time. splashy_update is used to send commands to the running Splashy daemon. See "COMMANDS" below to know which commands Splashy understands. OPTIONS
text Sends text to Splashy socket. COMMANDS
chroot <string> <string> is a valid path to which Splashy will be chroot'd. chvt <number> Switch to vt <number>. clear Clears the text box area. CLEAR Same as "clrprint". For compatibility with usplash. exit Exits Splashy server. getstring <string> Makes splashy prompt for a string. The first argument will be the prompt displayed. getpass <string> Same as getstring except that the characters typed will no be shown, like in a password box. progress <number> Updates the progress bar to <number>%, where N is a number between 0 and 100. PROGRESS <number> Same as "progress". For compatibility with usplash. print <string> Print <string> in the text box. scroll <string> Print <string> in the text box and scroll down. repaint Redraw the background image. TEXT <string> Same as "print". For compatibility with usplash. SCROLL <string> Same as "scroll". timeout <number> Sets the amount of seconds splashy waits for new commands. If that time is exceeded, it exits. QUIT Same as "exit". For compatibility with usplash. RETURN CODES
1 cannot open the socket 2 cannot write to socket 3 invalid args 255 /etc/splashy does not exist FILES
/etc/splashy/config.xml Main configuration. defines how splashy should be setup. SEE ALSO
splashy(1), splashy_config(1), splashy-config.xml(5), splashy-theme.xml(5) AUTHORS
Andrew Williams <mistik1@geeksinthehood.net> Luis Mondesi <lemsx1@gmail.com> perl v5.12.1 2010-07-05 SPLASHY_UPDATE(1)
All times are GMT -4. The time now is 05:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy