Sponsored Content
Top Forums Shell Programming and Scripting Bash script - $(ls expr) return double file name with one finishing with '.' Post 302718777 by neutronscott on Sunday 21st of October 2012 01:11:51 AM
Old 10-21-2012
don't need ls. never use for on ls.

Code:
for file in "$SRCDIR"/kate*; do
    [[ $file = *. ]] && continue
    # ...
done

or use extglob
Code:
shopt -s extglob
for file in "$SRCDIR"/kate!(*.); do
   # ...
done

This User Gave Thanks to neutronscott For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help in finishing 2 commands

the first one: 1. i am trying to build a command that searches a text file and outputs the number of words which consists of two 'b' characters in each word separatly like barby (the b characters must be separated from one another) i tried to use grep filepath then i know that we need... (3 Replies)
Discussion started by: newby2
3 Replies

2. Shell Programming and Scripting

Return to HTML file from shell script

Hi! I'm writing a simple script which I call on using a simple html button. The script also recives a simple argument. After the script is done I immediately want to return to my html page. But I dont know how to do that! #!/bin/sh echo "Content-type: text/html" echo "" if then echo... (1 Reply)
Discussion started by: crille
1 Replies

3. Shell Programming and Scripting

How to enter a return key in bash script?

Hi, I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP) I have this script working in both AIX and HP-UX. The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
Discussion started by: duker61
14 Replies

4. Shell Programming and Scripting

Script to return first x characters from file

I need a script to read the first 1000 characters of a text file regardless of how many lines it will span. So if my first line has 2000 characters i only want the first 1000 from this line, if my first and second lines have 500 character each then i want all the characters from both lines and... (5 Replies)
Discussion started by: kelseyh
5 Replies

5. Shell Programming and Scripting

Nested double quotes won't work in my bash script?

In a bash script I have: LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\"" ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null) But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits. I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies

6. Shell Programming and Scripting

Getting error in bash script; expr $a + 1: integer expression expected

Hi, I am new to shell/bash script. I am trying to run below script #!/bin/bash a=0 b=10 if then echo "a is equal to be" else echo "a is not equal to be" fi MAX=10 while do echo $a a='expr $a + 1' done (1 Reply)
Discussion started by: Mallikgm
1 Replies

7. Shell Programming and Scripting

Need help in finishing a bash script for listing subfolder by size in a large folder

Greetings everyone. I have seen that you do wonders here. I have a large folder on a Ubuntu linux. Organization main folder, inside 20 000 subfolders, and inside those subolders many other like 5-6 folders and files. I am interested to create an output to a txt file under the bash... (2 Replies)
Discussion started by: ultimo
2 Replies

8. Shell Programming and Scripting

Need output of script on screen and file with correct return status of the called script.

Hi, I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed. Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies

9. Shell Programming and Scripting

Return: can only `return' from a function or sourced script

Not sure where the problem is. I can run the script without any issue using the following command. . /opt/app/scripts/cdc_migration.sh But it fails with the below error when I try it this way /opt/app/scripts/cdc_migration.sh /opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Discussion started by: svajhala
1 Replies
KATE(1) 							 KDE User's Manual							   KATE(1)

NAME
kate - Advanced text editor for KDE SYNOPSIS
kate [-s, --start name] [-u, --use] [-p, --pid pid] [-e, --encoding name] [-l, --line line] [-c, --column column] [-i, --stdin] [KDE Generic Options] [Qt Generic Options] DESCRIPTION
Kate is the KDE Advanced Text Editor. Kate also provides the editor part for various applications, under the name KWrite. Some of Kate's many features include configurable syntax highlighting for languages ranging from C and C++ to HTML to bash scripts, the ability to create and maintain projects, a multiple document interface (MDI), and a self-contained terminal emulator. But Kate is more than a programmer's editor. Its ability to open several files at once makes it ideal for editing UNIX(R)'s many configura- tion files. This document was written in Kate. OPTIONS
-s, --start name Start Kate with a given session. -u, --use Use an already running Kate -p, --pid pid Only try to reuse kate instance with this pid -e, --encoding name Set encoding for the file to open You can use this to force a file opened in utf-8 format, for instance. (The command iconv -l provides a list of encodings, which may be helpful to you.) -l, --line line Navigate to this line -c, --column column Navigate to this column -i, --stdin Read the contents of stdin SEE ALSO
More detailed user documentation is available from help:/kate (either enter this URL into Konqueror, or run khelpcenter help:/kate). There is also further information available at the Kate website: http://kate.kde.org/. EXAMPLES
To open a file named source.cpp at column 15, line 25, in an existing Kate window, you could use: kate -c 15 -l 25 -u source.cpp If you have an active internet connection, you can take advantage of KDE's network transparency to open a file from an ftp site. If you do not have write permission on the remote server, the file will be opened read only and you will be prompted for a local filename to save to if you make changes. If you do have write permission, changes will be saved transparently over the network. kate ftp://ftp.kde.org/pub/kde/README_FIRST AUTHORS
The maintainer of Kate is Christoph Cullmann <cullmann@kde.org>. A comprehensive list of authors and contributors is available in the com- plete user manual mentioned above. AUTHOR
Lauri Watts. K Desktop Environment June 07, 2005 KATE(1)
All times are GMT -4. The time now is 05:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy