Using tab in script to create file of commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using tab in script to create file of commands
# 1  
Old 08-31-2008
Using tab in script to create file of commands

from CLI pressing Tab and character like [TAB] a shows result of the commands starting with a,
can i use this in a script too and post the results to a file?

thanks
# 2  
Old 08-31-2008
I don't think it can be done, unless there is some system call to achieve that function. But You could try something like this

Code:
search='apt*'
find $(echo $PATH|tr ":" " ") -type f -name $search -perm -o+x -exec basename {} \; > searchresult.lis

unless it's too clumsy...
/Lakris

PS This won't find aliases
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How can i create a script that will ssh a device and type some commands?

Hi Guys, this is the scenario: ubuntu pc and I have 10 wireless devices that I need to check their firmware version. I would like to create a script that it will ask me IP, after I enter it, I hit enter then it will show me the version of the firmware. this is what i do. ssh... (9 Replies)
Discussion started by: gabak
9 Replies

2. Shell Programming and Scripting

Create a UNIX script file with multiple commands

Hi Good morning all, I want to create script file with multiple commands. For ex: pmrep connect is one of the command to connect to repository. pmrep objectexport is another command to export objects to a file. These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
Discussion started by: SekhaReddy
4 Replies

3. Shell Programming and Scripting

How to create an executable bash script for these commands?

I wish to create an executable bash script that will run the following commands as root, that is, using sudo su iptables-save | awk '/^ / { print $1 } /^:+ / { print $1 " ACCEPT" ; } /COMMIT/ { print $0; }' | iptables-restoreMy first attempt at bash... (9 Replies)
Discussion started by: thixeqi
9 Replies

4. Shell Programming and Scripting

Shell script - Excel/CSV file - More than one tab

Hi All, Following is my requirement. I have searched the site and found some threads which has same queries, but non of them have any answer. I thought of posting it once more. We are generating different reports through shell script after we finish our data load. Currently there are 7 such... (5 Replies)
Discussion started by: ace_friends22
5 Replies

5. Shell Programming and Scripting

Create tab-delimited file of outputs - Perl

Title is very broad, but here's an outline of what I have done so far: - I have multiple subdirectories containing multiple *.fna files of DNA sequences - I've been able to traverse these subdirectories and create a tab-delimited text file (i.e. the association file) that shows the contents of... (1 Reply)
Discussion started by: shwang3
1 Replies

6. Shell Programming and Scripting

to create a phone book using shell script and unix commands

can you help me to create a phone book with add, delete, modify with first name, last name, middle name, phone no(multiple ph no), address, email address, notes or comments to store about the contact and groups that hold for the contact.. i am new to this linux environment. please guide me. ... (1 Reply)
Discussion started by: monster11209
1 Replies

7. UNIX for Dummies Questions & Answers

How to create concatenate a file in tab format

Hi, Do you know given a file which is SED at the same time, how to read it and AWK it in tabs format. Means:- I have an input file which is (at the same time perform sed):- 1 2 3 4 5 6 7 I would like to print out in tab format which is:- 1 2 3 4 5 6 7 .... (12 Replies)
Discussion started by: ahjiefreak
12 Replies

8. Shell Programming and Scripting

Modifying simple commands to create a script

Can anyone direct me to a resource that explains scripting in simple terms? I have visited many sites and browsed this forum and have yet to find simple explanations. (8 Replies)
Discussion started by: rocinante
8 Replies

9. Shell Programming and Scripting

Multiple commands TAB delimited

Hey guys... Running Solaris 5.6, trying to write an easy /sbin/sh script. I want to run several commands, then have the results appear on one line. Additionally, I want the results to be separated by <TAB>. Let's say that my script calls three commands (date, pwd, and hostname), I would want... (2 Replies)
Discussion started by: cdunavent
2 Replies

10. UNIX for Advanced & Expert Users

cron tab commands

Hello: If I want to run a crontab every hour between 9 am to 9pm, will this work 00 09-19 * * * /.../.../../program.sh If the above does not work, what should it be ?? Thanks, ST2000 (4 Replies)
Discussion started by: ST2000
4 Replies
Login or Register to Ask a Question