-1
votes
3answers
152 views

Checking if line in file exist

I have a bash script which asks a user for the number of CPU cores and saves it to variable named $cores. Now I want to add this variable to .bashrc, so I ask user how much CPU cores he has and then ...
1
vote
1answer
97 views

Editing the .profile file to access

I am trying to source my .profile file to easily access a directory of javatools. The bash code below seems like it should work but it does not. Any help troubleshooting this script would be very much ...
3
votes
1answer
199 views

A robust way to execute a command/run a script at login?

I have two commands that change keyboard behaviour: xset r rate 120 66 /usr/bin/setxkbmap -option "ctrl:nocaps" When I open a terminal and execute them, they change auto-repeat settings and remap ...
2
votes
2answers
1k views

How to write a shell script that gets executed on login in?

I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that ...
0
votes
2answers
610 views

Bash script error trying to find directory of script itself: unexpected end of file

Borrowing graciously from this StackOverflow answer, I want to find the directory a script is running in so I can load relative paths for it on login: The script is pretty small right now: ...