Sponsored Content
Top Forums Shell Programming and Scripting Shell Scripting - Select multiple files from numbered list Post 303023738 by vgersh99 on Friday 21st of September 2018 10:49:08 AM
Old 09-21-2018
I'd recommend looking at the bottom of this thread for More UNIX and Linux Forum Topics You Might Find Helpful threads.
Also look a simple menu building script as a sample of using select and case:
Code:
#!/usr/bin/bash

files='*sh';
actions='cat edit quit'
PS3="Pick one of the above [${actions}]: "
TMOUT=10

select i in ${actions}
do
   case $i in
      cat)  eval cat "${files}" ;;
      edit) eval ${EDITOR-vi} "${files}" ;;
      quit) break ;;
      "") print -u2 you must select one of the above [${actions}] ;;
   esac
done

These 2 Users Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl - how to make output of a command a numbered list

Hi there, just wondered if somebody could help me with a problem I have I have a program that when run from the command line will output a list of objects # list_servers server1 server5 server7 server8 # I just wanted to know, in perl, how can i make each line of output from... (4 Replies)
Discussion started by: rethink
4 Replies

2. Shell Programming and Scripting

How to process multiple input files using Shell scripting

Hi, I would like to write a for loop that does the following: I have a file called X.txt and other files called 1.txt,2.txt, .....,1000.txt. I want to substitute the 6th column of the file X.txt with 1.txt and store the output as X.1. Then I want to do the same with X.txt and 2.txt and store... (0 Replies)
Discussion started by: evelibertine
0 Replies

3. Shell Programming and Scripting

rename numbered files to numbered files with leading zeroes

Hi, I have some hundreds/thousands of files named logX.dat, where X can be any integer, and they are sequential, X ranges between 1 and any number: log1.dat log2.dat log3.dat log6.dat log10.dat ... log6000.dat I would like to rename them to scatter_params_0001.dat... (6 Replies)
Discussion started by: pau
6 Replies

4. Shell Programming and Scripting

How to process select list of files and output to the same file?

Hi, I've a list of files ac_info.tps, subscription_array.tps, .......and many other files one of the file, bin_range_list.tps has the following content CREATE OR REPLACE TYPE "BIN_RANGE_LIST" AS TABLE OF BIN_RANGE_ELEM; / grant execute on... (4 Replies)
Discussion started by: jediwannabe
4 Replies

5. Shell Programming and Scripting

How to use a multiple line list with the select command in ksh?

I copied the below program to play around with displaying a list of items using the select command in ksh. When I put all items in the same line, it works fine. I am trying to use multiple lines instead of a single row...my list is too large for a single line. How do I get the line continuation... (3 Replies)
Discussion started by: haganator
3 Replies

6. Shell Programming and Scripting

Concatenate select lines from multiple files

I have about 6000 files of the following format (three simplified examples shown; actual files have variable numbers of columns, but the same number of lines). I would like to concatenate the ID (*Loc*) and data lines, but not the others, as shown below. The result would be one large file (or... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

7. Shell Programming and Scripting

Select answers from multiple questions using shell script

I have a text file in this format Some lines.... Question no: 1 The question? A. Answer 1 B. Answer 2 C. Answer 3 D. Answer 4 Answer:B Some lines.... Question no: 2 The question? (choose 2) (10 Replies)
Discussion started by: zorrox
10 Replies

8. Shell Programming and Scripting

Select multiple column from multiple files

Hi Friends, $ cat test1.txt emeka:1438 shelley:1439 dmeyer:1440 kurtarn:1441 abdul:1442 $ cat test2.txt 1:a 2:b 3:c 4:d $ cat test3.txt cat:dog:bat man:hot:cold (5 Replies)
Discussion started by: Jewel
5 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Export Oracle multiple tables to multiple csv files using UNIX shell scripting

Hello All, just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table. Can you please suggest why? or any better idea? export FILE="/abc/autom/file/geo_JOB.csv" Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
nautilus-actions-config-tool(1) 			      General Commands Manual				   nautilus-actions-config-tool(1)

NAME
nautilus-actions-config-tool - configure programs to launch from the nautilus file manager SYNOPSIS
nautilus-actions-config-tool OPTIONS
Help Options -?, --help Show help options -?, --help-all Show all help options -?, --help-misc Application Options -?, --non-unique Set it to run multiple instances of the program [unique] -?, --version Output the version number, and exit gracefully [no] -?, --display=DISPLAY X display to use DESCRIPTION
nautilus-actions is an extension for the nautilus file manager which allows arbitrary programs to be launched through the nautilus context menu. Each time you right-click on one or more files in nautilus, or any part of the background of the currently opened folder, nautilus-actions will look at its configured actions to see if a program has been setup for this selection. If so, it will add an item to the menu that allows you to execute the program on the selected files. Configurations are stored in GConf for speed and integration with other GNOME programs. Configs can be easily shared using the "Import/Export assistant" menu items in the Tools menu of nautilus-actions-config-tool /. BUGS
Please report bugs in nautilus-actions to <submit@bugs.debian.org>. The current bug list may be viewed at <http://bugs.debian.org/nautilus- actions>. AUTHOR
nautilus-actions was written by Rodrigo Moya <rodrigo@novell.com>, Frederic Ruaudel <grumz@grumz.net>, Pierre Wieser <pwieser@trych- los.org>, and contributors. This manual page was written by Christine Spang <christine@debian.org> and Alice Ferrazzi <aliceinwire@gnumerica.org>, for the Debian project (but may be used by others). LICENSING
Both the nautilus-actions source code and this man page are licensed under the GNU General Public License. SEE ALSO
nautilus(1),nautilus-actions-new(1),nautilus-actions-print(1) Debian GNU/Linux 2011-11-05 nautilus-actions-config-tool(1)
All times are GMT -4. The time now is 09:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy