10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear UNIX experts,
I'm a command line novice working on a Macintosh computer (Bash shell) and have neither found advice that is pertinent to my problem on the internet nor in this forum.
I have hundreds of .csv files in a directory. Now I would like to copy the subset of files that contains... (8 Replies)
Discussion started by: rcsapo
8 Replies
2. Shell Programming and Scripting
Hi All,
I am having a situation now to delete a huge number of temp files created during run times approx. 16700+ files. We have never imagined that we will get this this much big list of files during run time. It worked fine for lesser no of files in the list. But when list is huge we are... (7 Replies)
Discussion started by: mad man
7 Replies
3. Shell Programming and Scripting
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
1|ABC DEF|100|10
2|PQ
RS
T|200|20
3| UVWXYZ|300|30
4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies
4. Shell Programming and Scripting
Hi everybody
I am trying to merge many files in one files using paste or pr command but I am not able to resolve this issue.
The file are tab delimited like these:
1 4721519 4723118
1 5022468 5024918
1 7093519 7098118
2 19736573 19741172
2 21907973 21910572... (4 Replies)
Discussion started by: giuliangiuseppe
4 Replies
5. Shell Programming and Scripting
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Discussion started by: Abhiraj Singh
6 Replies
6. UNIX for Dummies Questions & Answers
I have a fixed length file and I want to find out row number along with row length.
I have a program that give me the line length if it satisfy the condition; but i would like to add row number as well?
How do I do that?
while IFS= read -r line; do
if ; then
echo ${line}
echo... (8 Replies)
Discussion started by: princetd001
8 Replies
7. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
8. Shell Programming and Scripting
I want to write a scrpit to merge files row wise (actually concatinating)
main.txt
X Y Z
file 1
A B C
file 2
1 2 3
now i want the script to check if the file1 is empty or not, if empty then make it like
A B C
1 2 3
again to check if second file is empty if not do as done... (0 Replies)
Discussion started by: shashi792
0 Replies
9. Shell Programming and Scripting
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
Discussion started by: juelillo
6 Replies
10. Shell Programming and Scripting
I Have this code
while
do
column1=":`cat /home/test_inter.txt|head -${iCount1}|tail -1|cut -d "," -f2`"
columnA=$columnA$column1
iCount1=`expr ${iCount1} + 1`
done
echo $columnA (2 Replies)
Discussion started by: nvuradi
2 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 file name 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)