Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell script to search for text in a file and copy file Post 302187178 by psychobeauty on Saturday 19th of April 2008 05:55:35 PM
Old 04-19-2008
if u want to input in each time what the script to find u???
what do u change??

Last edited by psychobeauty; 04-19-2008 at 07:30 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search for the contents in many file and print that file using shell script

hello have a file1 H87I Y788O T347U J23U and file2 J23U U887Y I99U T556U file3 I99O J99T F557J file4 N99I T666U R55Y file5 H87I T347U file6 H77U R556Y E44T file7 Y788O K98U H8I May be using script we can use file1 to search for all the files and have the output H87I file5... (3 Replies)
Discussion started by: cdfd123
3 Replies

2. Shell Programming and Scripting

To search a file for a specific word in a file using shell script

Hi All, I have a sql output file has below. I want to get the values 200000040 and 1055.49 .Can anyone help me to write a shell script to get this. ACCOUNT_NO ------------------------------------------------------------ BILL_NO ... (8 Replies)
Discussion started by: girish.raos
8 Replies

3. Shell Programming and Scripting

Perl or Awk script to copy a part of text file.

Hi Gurus, I'm a total newbie to Perl and Awk scripting. Let me explain the scenario, there is a DB2 table with 5 columns and one of the column is a CLOB datatype containing XML. We need all the 4 columns but only a portion of string from the XML column. We decided to export DB2 table to a .del... (26 Replies)
Discussion started by: asandy1234
26 Replies

4. Homework & Coursework Questions

creating search script for a text file

I am aware of the stipulations regarding homework, however I am completely stuck and do not know how to even begin the following (in bash): Create a script that searches for a text file with most occurrences of a given keyword. Any help is greatly appreciated. Thank you (1 Reply)
Discussion started by: hybridoutlaw
1 Replies

5. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies

6. Shell Programming and Scripting

Shell script to copy file

Dear all, I have a database with thousands of files with the structure of name is: Filename_hour_year.abc Filename_hour_year_1.abc .............. So what I need is how to write a script that all file with contain the character "_1" will copy to "_2" For example: file name:... (7 Replies)
Discussion started by: hainguyen1402
7 Replies

7. Shell Programming and Scripting

shell or perl script needed for ldif file to text file conversion

This is the ldf file dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com objectClass: sdcsSubscriber objectClass: top postalCode: 29600 sdcsServiceLevel: 10 sdcsCustomerType: 14 givenName: Adelia sdcsBlackListAll: FALSE sdcsOwnerType: T-Mobile sn: Actionteam... (1 Reply)
Discussion started by: LinuxFriend
1 Replies

8. Shell Programming and Scripting

Need to build Shell Script to search content of a text file into a folder consist several files

Have to read one file say sourcefile containing several words and having another folder containing several files. Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies

9. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

10. Shell Programming and Scripting

Need help to write a shell script to convert text file to excel file.

Hi Everyone, I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet. Example input: IpAdress:InstanceName:Port:ServerName 10.255.255.1:abc:2232:xyz_abc Output should be an excel sheet like below: Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies
gitaction(1)						      General Commands Manual						      gitaction(1)

NAME
gitaction - GNU Interactive Tools - per file type action script SYNTAX
gitaction directory file .gitaction directory file DESCRIPTION
gitaction is a script that executes a different action for each file type specified. It is called by the gitfm program when pressing F2 or ^Xa (see the gnuitrc.TERM configuration files in the gnuit manual). The first parameter is the current directory name and the second one is the file name to be matched against the default patterns. The matching is done using the shell 'case' statement. If you press F2 or ^Xa on a *.html file, gitfm will invoke a browser to view it, if you press F2 or ^Xa on a *.tar.gz file, gitfm will list the tar archive contents, if you press the same keys on a *.gz file, gitfm will display its uncompressed contents on the screen, etc ... If you press F2 or ^Xa on a *.gif file or *.jpg file and you have the zgv utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the gitaction script. There are many more file types and viewers that gitaction knows about. In addition, if you are running under GNOME, gnome-open is used, and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks. If all else fails, the file is displayed using $GNUIT_PAGER. Feel free to change this. If you want to find out what the default action for each file type is (or if you want to modify it), just read/modify the gitaction script. The script can be easily enhanced. Just read it. The .gitaction script is a local version of the gitaction script. When started, gitaction tries to search a script called .gitaction in the current directory and, if it finds it, it starts it. If .gitaction's exit code is 0 ( .gitaction couldn't find a matching pattern), gitac- tion starts its own case statement trying to match the current file name (the second parameter) against its default patterns. The .gitaction script *must* be executable. An example of .gitaction can be found in the directory gitfm is installed into. (usually /usr/local/bin or /usr/bin) Debian users can find it in /usr/share/doc/gnuit/examples/. You should copy the example to the current direc- tory or your home directory and then modify it. BUGS
Please send bug reports to: gnuit-dev@gnu.org SEE ALSO
gitfm(1) gitps(1) gitview(1) gitmount(1) gitkeys(1) gitrgrep(1) gitunpack(1) AUTHORS
Tudor Hulubei <tudor@cs.unh.edu> Andrei Pitis <pink@pub.ro> Ian Beckwith <ianb@erislabs.net> (current maintainer). gitaction(1)
All times are GMT -4. The time now is 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy