10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am part of the group group1. The directory permission I am trying to cd into are 770 for both the parent directory and child directory but I still can not cd into. What am I doing wrong?
$ ls -l /NAS/infa/
drwxrwxr-x. 22 user1 group1 506 Jun 6 17:05 infa_shared
$... (5 Replies)
Discussion started by: cokedude
5 Replies
2. Shell Programming and Scripting
In the below I am trying to create a parent directory using the R_2019 line from f1 if what above it is not empty.
I then create sub-directories under each parent if there is a match between $2 of f1 and $2. Inside each sub-folder the matching paths in $3 and $4 in f2are printed. If there is no... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
So I struggled to find a solution to the following problem:
I want to make sed print only part of multiple different paths.
So lets say we have
/path/path1/path2/logs/bla/blabla
/path/path1/path2/path3/logs/yadda/yadda/yadda
Can someone suggest a way to make sed or other... (5 Replies)
Discussion started by: dampio
5 Replies
4. Shell Programming and Scripting
Hello,
I need to add a part of folder name to the files inside it. For instance the file is
HMCBackup_20150430.155027.tgz
and it is under directory /nim/dr/HMCBackup/cops22
I need to add cops22 to the file name so as it would be cops22_HMCBackup_20150430.155027.tgz
Any help in doing... (10 Replies)
Discussion started by: hasn318
10 Replies
5. Shell Programming and Scripting
I am trying to use awk to calculate the average of all lines in $2 for every file in a directory. The below bash seems to do that, but I cannot figure out how to capture the string before the _ as the output file name and have it be tab-delimeted. Thank you :).
Filenames in... (3 Replies)
Discussion started by: cmccabe
3 Replies
6. Shell Programming and Scripting
My bash below verifies the integrity of all .bam in a directory and writes the out output to a .txt file. That is part one of the script that works. The second part of the bash searches each one of the .txt files for a string "(SUCCESS)" and if found display a message and if it is not found... (6 Replies)
Discussion started by: cmccabe
6 Replies
7. Shell Programming and Scripting
I'm making a shell script to:
-copy directories to a new location
-perform conversions on the files within the copied directories
-move the newly created files to a new directory
Please see my super basic script and notes below... and thank you thank you thank you in advance !!
... (1 Reply)
Discussion started by: kayzee
1 Replies
8. Shell Programming and Scripting
i have a directory like this:
i want to get the subpaths:
/home/user/public_html/a/b
subpath= a/b
/home/user/public_html/a/b/c
subpath= a/b/c
i can get the user like
echo $fulldirectory |awk -F/ '{print $3}'
but im not sure how to get the rest of it after public_html
any ideas?... (3 Replies)
Discussion started by: vanessafan99
3 Replies
9. Shell Programming and Scripting
Hi,
I would like to return the last part of a string in an array of strings in bash.
The array contains in each position the content below:
and I would like to return only the last part of each string.
The correct result would be:
How can I do that in bash using AWK?... (7 Replies)
Discussion started by: anishkumarv
7 Replies
10. Shell Programming and Scripting
I would like my csh prompt to behave like the linux csh prompt setting done by linux command (set prompt="%n@%m %c]$ ")
how do I do that?
What I'm trying to do is that I would like to see what directory I'm in by looking at the prompt.
I've figured out that %n is like $user, and %m is like... (3 Replies)
Discussion started by: jamesloh
3 Replies