Here I used awk to replace everything except "#" on your "§" line with spaces. This is used as a template to insert the required comments:
This helps the formatting to match:
Hello everyone!
I have a file: text.txt
and also a list of replacement: replace.txt (tabbed)
is isn\'t
Mac Windows
will won\'t
\.\n \! <--- ! plus 2 spaces
I want a script which will change text.txt as
I made a script:
#!/bin/bash
echo Please input the file of... (2 Replies)
I'm finding the following command very tedious to type in all the time, so I created a one line bash script called mount.bash with the following contents:
mount -t cifs //mark/C\$ -o unc=//mark\\C$,ip=10.1.1.33,user=Administrator,password=$1 /mnt/mark
I don't like the fact that I have to put... (5 Replies)
I am using HP UX and think this may be done with awk but bot sure.
I have a file with a several header records and undeneath many detail records I need to put in the header record the number of detail records above this header record and number of detail records below this header record
Header... (5 Replies)
Hello all,
I would like to replace some text that are forwarded in standard output from a script, then save the replaced text to a file.
The text i would like to replace is in the form of:
1 some text
1.1 other text
1.2 more text
1.2.1 still more text
i would like to replace
1 some... (5 Replies)
I have several files that I need to modify using sed. I know how to do that, but now a new requirement has come up.
Now, I need to make changes to all lines that don't start with certain strings. For example, I need to change all lines except for lines that start with "a", "hello there",... (3 Replies)
hi,
I am stuck at a place. Please help me out. Here is what i need to do.
Search for a pattern in a propertyfile and change only at one occurance. I have these statements and assignment as a part of the propertyfile
#Note : The Address should be replaced with actual address dynamically.
... (7 Replies)
Hello,
I have a bunch of xml file that needs to have edits made and I was wondering if a BASH script could handle it.
I would like the script to look within my xml files and replace all integers greater than 5px with a value that is 25% smaller. For example, 100px = 75px. Since the integers... (12 Replies)
myscript.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
when I run the above script from the command line, i run it as:
./myscript.sh jsmith
now some times, i need to runn it this way: (8 Replies)
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
LEARN ABOUT SUSE
rbash
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)