Sponsored Content
Full Discussion: missing in script
Operating Systems Linux missing in script Post 302197694 by unSpawn on Wednesday 21st of May 2008 12:39:56 PM
Old 05-21-2008
Code:
#!/bin/bash
FILE="$3"; grep "^CREATE.VIEW" $FILE | while read -a LINE; do 
 XPL="${LINE[2]//./ }"; XPL=(${XPL//_/ }); if [ "${XPL[0]}" != "$1" ]; then
  if [ "${XPL[1]}" != "$2" ]; then XPL=( $1 .$2 ${XPL[@]}); fi
 else unset XPL[0]; XPL=( $1 .$2 ${XPL[@]}); fi
 IMPL=${XPL[@]}; IMPL=${IMPL// /_}; IMPL=${IMPL//_./.}
 echo "sed -i \"s|${LINE[2]}|${IMPL}|\" $FILE"; done; exit 0

Apologies for using BaSH and unoptimised statements, OTOH its just a kludge. Run as "scriptname OPSDM002 VW dim_copy.20080516.sql" should echo to stdout what it could do. It doesn't op on the file at all unless you fix the echo line (maybe anchoring sed as well). Dunno, HTH.
 

10 More Discussions You Might Find Interesting

1. Red Hat

httpd startup script is missing

I use CenOS Enterprise 5. I've removed existing apache2 then installed the latest apache2. Everything is fine except the original /etc/rc.d/init.d/httpd is now missing. Without this file I can't add httpd to service (commands like "service httpd start" does not work). I have tried to link... (2 Replies)
Discussion started by: aixlover
2 Replies

2. Shell Programming and Scripting

Missing ] error in csh script

The below script gives error: Missing ] #!/bin/csh set MAX=15 set PATTERN='dtsession' set NUM=`ps -eaf | grep -c $PATTERN` echo "No of dtsession = "$NUM if then echo 'Quota exceeded permissible limit' echo 'sending mail...............' mail hiten.r.chauhan@gmail.com<<EOF ... (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

3. Shell Programming and Scripting

Bash script - im missing something and cant's figure out what

I just put together a script for work that will essentially automate the migration of our Windows fileserver to my newly created Debian based SAMBA server. My script will create the necessary directories then copy the data over to my new server, after that it will set the ACL's by using... (3 Replies)
Discussion started by: binary-ninja
3 Replies

4. Shell Programming and Scripting

Shell script simple if then :: fi missing ]

If file exists then do stuff else do nothing... #! /bin/sh if then rm /home/dudemgnt/public_html/fileserver/Checks/Daily/RefundChecksDaily.csv cat /home/dudemgnt/public_html/fileserver/Checks/Daily/RefundChecksDaily*.txt|sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' >... (4 Replies)
Discussion started by: Astrocloud
4 Replies

5. Shell Programming and Scripting

Case script to get missing sequence among files

I want to use case statement to find the range of missing sequence in my directory which it has some few ( dat & DAT ) files my directory /home/arm/my_folder/20130428 contains : f01_201304280000.DAT f01_201304280001.DAT f01_201304280003.DAT f02_201304280000.dat f02_201304280002.dat... (2 Replies)
Discussion started by: arm
2 Replies

6. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

7. Shell Programming and Scripting

Help with awk script to get missing numbers in column 1

Hello to all, I have show below a file separated by commas. In first column has numbers where the last number is 13. 1,4 2,6 3,7 5,2 6,5 7,5 8,65 9,10 11,78 13,2 What I want to know is which numbers are missing from 1 to 13 (in this case 13 is last number in column 1). My real... (17 Replies)
Discussion started by: Ophiuchus
17 Replies

8. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

9. Shell Programming and Scripting

Fix script to get missing information

Gents, Can you please help me to fix the following script in order to get complete data as desired. I am missing some data in output. the complete input file is attached. The script I am using is awk '{\ status=substr($0,91,2)\ ind=substr($0,26,1);\ ... (10 Replies)
Discussion started by: jiam912
10 Replies

10. UNIX for Beginners Questions & Answers

Error in ksh script: missing right bracket

I have no idea how to write ksh script, but i'm really in need of help with this. I using fedora 30 and in attempt of runnig attached script i getting those errors, i solved first error by removing excess bracket, but i do not know what should i do with other. Pls sorry for trash post. (8 Replies)
Discussion started by: NullPtr
8 Replies
GEDIT(1)						      General Commands Manual							  GEDIT(1)

NAME
gedit - text editor for the GNOME Desktop SYNOPSIS
gedit [OPTION...] [FILE...] [+LINE[:COLUMN]] DESCRIPTION
gedit is the official text editor of the GNOME desktop environment. While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor. It can be used to create and edit all kinds of text files. gedit features a flexible plugin system which can be used to dynamically add new advanced features to gedit itself. OPTIONS
-b, --background Run gedit in the background. --encoding Set the character encoding to be used for opening the files listed on the command line. -g, --geometry=GEOMETRY Set the X geometry window size (WIDTHxHEIGHT+X+Y). --list-encodings Display list of possible values for the encoding option and exit. --new-window Create a new toplevel window in an existing instance of gedit. --new-document Create a new document in an existing instance of gedit. -s, --standalone Run gedit in standalone mode. -w, --wait Open files and block the gedit process. --help Prints the command line options. --version Output version information and exit. FILE Specifies the file to open when gedit starts. If this is not specified, gedit will load a blank file with an "Unsaved Document" label. Multiple files can be loaded if they are separated by spaces. gedit also supports handling of remote files. For example, you can pass the location of a webpage to gedit , like "http://www.gnome.org", or load a file from a FTP server, like "ftp://ftp.gnome.org/robots.txt". +LINE For the first file, go to the line specified by LINE (do not insert a space between the "+" sign and the number). If LINE is miss- ing, go to the last line. COLUMN For the first file, go to the column specified by COLUMN. If COLUMN is missing, go to the first column. BUGS
If you find a bug, please report it at http://bugzilla.gnome.org/enter_bug.cgi?product=gedit. AUTHORS
Paolo Maggi (paolo@gnome.org) Paolo Borelli (pborelli@katamail.com) Steve Frecinaux (code@istique.net) Jesse van den Kieboom (jessevdk@gnome.org) Ignacio Casal Quinteiro <icq@gnome.org> James Willcox (jwillcox@gnome.org) Federico Mena Quintero (federico@novell.com) Chema Celorio 17 May 2010 GEDIT(1)
All times are GMT -4. The time now is 07:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy