Sponsored Content
Top Forums Shell Programming and Scripting create file as variable for searching point Post 302434536 by budi.mulya on Saturday 3rd of July 2010 07:52:46 AM
Old 07-03-2010
MySQL Thanks

Hi daPeach,

The script is working great exactly as I want.

thank you very much.

maybe you or other can answer my second question ?

2010062[0123456] to match date 20100620 until 20100626
how to match last 2 digit example from date 20100615 until 20100626
where 15-26 is variable
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create new file by searching another file

Hi , I need to write a korn shell to read a file, say Test.txt, and search the file for key words like "email", "name", etc line by line. Whatever is found on a line, send it to an output file. Do this until the end of the file. I have the following code below, that I'm trying to tweak but it... (13 Replies)
Discussion started by: leo
13 Replies

2. Linux

How to create file on Linux using environment variable in the dirpath

Hi all, I am running a Java program on a Linux server in which I read in a base directory path from the *.properties file. During processing, I build a unique file name and create a file to save data, concatenating the directory path and the file name. Works fine, except that I now need to... (2 Replies)
Discussion started by: patricia1of5
2 Replies

3. Shell Programming and Scripting

setting a variable by searching within a file

Hi, I am trying to set a variable to be used in later scripting, and am having some difficulty. I want to look in a file called scan.info and find the line that says "variable ok". Then I want to cut the number at the beginning of that line and assign that number as a variable so that later... (4 Replies)
Discussion started by: garth6@hotmail.
4 Replies

4. UNIX for Dummies Questions & Answers

Searching a text file and assigning it to a variable

Hi Gurus, I am new to unix.I have a requirement as below I have text file like a.txt which contains a.txt hi hello process update status Ok to Proceed no issues good data arrangement My requirement here is i need to read the file and check for the words "OK to Proceed" and if... (2 Replies)
Discussion started by: pssandeep
2 Replies

5. Shell Programming and Scripting

Read a file and create egrep variable

I want to create a egrep variable from a file. For example: string=`cat query.txt` cat myfile.txt | egrep "$string" The string variable file has a list of one or multiple lines So the end result of: cat myfile.txt | egrep "$string" would be: cat myfile.txt | egrep... (2 Replies)
Discussion started by: numele
2 Replies

6. Shell Programming and Scripting

Need to create concatenate the shell variable with file content

Hi Guys, I have a file. Each record needs to inserted into a table. The table also have other columns which needs to be inserted with Shell variables. The following is the file. Error code None. Error Code 1 The shell script is having these variables. Name=Magesh Dep=Coding ... (1 Reply)
Discussion started by: mac4rfree
1 Replies

7. Shell Programming and Scripting

Fetch the different data by searching with a same variable from a file in AIX server

Hi, I am trying to fetch the different values in an xml file by searching with the same variable in AIX Server. <name>SharedResources/Shared/JNDI/Username</name> <value>admin</value> <name>SharedResources/Shared/JNDI/Username</name> ... (1 Reply)
Discussion started by: tejastrikez
1 Replies

8. Red Hat

How to create local mount point at startup?

how to create local mount point at startup Filesystem GB blocks Free %Used Iused %Iused Mounted on xxxxxxxx 370.00 180.08 51% 24500 1% /test (5 Replies)
Discussion started by: karthik9358
5 Replies

9. UNIX for Beginners Questions & Answers

How to create a new mount point with 600GB and add 350 GBexisting mount point? IN AIX

How to create a new mount point with 600GB and add 350 GBexisting mount point Best if there step that i can follow or execute before i mount or add diskspace IN AIX Thanks (2 Replies)
Discussion started by: Thilagarajan
2 Replies

10. UNIX for Beginners Questions & Answers

Can we create any check-point feature in shell ?

I have a script as below and say its failed @ function fs_ck {} then it should exit and next time i execute it it should start from fs_ck {} only Please advise #!/bin/bash logging {} fs_ck {} bkp {} dply {} ## main function### echo Sstarting script echo '####' logging fs_ck... (3 Replies)
Discussion started by: abhaydas
3 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a filename containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 10:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy